Slashdot Mirror


Pthreads vs Win32 threads

An anonymous reader writes "It's interesting when different people have different opinions. While I was searching for something on Intel's website, I came across an article on why Windows threads are better than Posix threads. Curiously, I also came across this article on why Posix Pthreads are better that Win32 threads. The thing is, both of these articles are written by the same author!

So who is right (metaphorically speaking?), or what has changed since the first article was written?"

21 of 385 comments (clear)

  1. Pthreads = Win32 threads? by arlo5724 · · Score: 5, Funny

    ( Pthreads >= Win32 threads ) and ( Win32 threads >= Pthreads ) => Pthreads = Win32 threads

    1. Re:Pthreads = Win32 threads? by anci_pants · · Score: 5, Funny

      I think you mean Pthreads == Win32 threads.

      Although, it may be true that Win32 threads = Pthreads (which may account for the improvement)

    2. Re:Pthreads = Win32 threads? by evil_Tak · · Score: 2, Funny

      Visual basic. Or are we only counting real languages?

  2. From the obvious dept by hey · · Score: 5, Funny

    If you are programming on Widows I would recommend Windows threads, while on *nix Pthreads are a better choice.

    1. Re:From the obvious dept by Hal_Porter · · Score: 5, Funny

      Windows threads work on BOTH platforms, Windows XP/Vista and Windows CE.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    2. Re:From the obvious dept by drinkypoo · · Score: 2, Funny

      If you are programming on Widows I would recommend Windows threads, while on *nix Pthreads are a better choice.

      If you are programming on Widows, may I suggest a chair? It's typically more comfortable.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    3. Re:From the obvious dept by BalkanBoy · · Score: 3, Funny
      > If you are programming on Widows ...

      I'd say if you're programming on widows, you need to find a way to replace the defunct parent process by forking yourself into a parent... but this is impossible since the child process(es) will absolutely refuse to have their defunct parent re-forked by some other forker who's coming in from a different, unsafe, unprotected location. Thus threading in lightly, and establishing shared values with the children whose parent has defuncted might be your only option of success when programming on widows...

      --
      'A lie if repeated often enough, becomes the truth.' - Goebbels
  3. It's quite simple, really by 0xdeadbeef · · Score: 3, Funny

    One uses lowercase and underscores. The other uses studlycaps and Hungarian notation. It is an aesthetic choice.

  4. Re:better yet by burk3 · · Score: 3, Funny

    So one might say that intel goes both ways?

  5. Re:$Money$ by Anonymous Coward · · Score: 1, Funny

    I'm used to reading comments on slashdot, but this one confuses me -- what is smoneys?

  6. Re:quothe the poster by Anonymous Coward · · Score: 3, Funny

    Get it right, assmuch. It's Linsucks or Linsux.

    Vista is the coolest OS ever. OS X 10.4 is a total rip off of it.

  7. Re:And so the point becomes... by skoaldipper · · Score: 5, Funny

    > Who gives a shit. They're just threads, man. Both work.

    You know, I said this very same thing back in the 70s. However, my buddy with the bell bottoms and KISS shirt got more play than I ever did with my adidas shorts and Vader cape.

    --
    I hope, when they die, cartoon characters have to answer for their sins.
  8. Re:quothe the poster by should_be_linear · · Score: 5, Funny

    I have different theory: Dude has 2 separate threads in his brain. Comparing pthreads to Win32 threads only exposed dangerous race condition producing funny effects in his blog.

    --
    839*929
  9. Opinion by Anonymous Coward · · Score: 2, Funny

    "It's interesting when different people have different opinions."

    No it is not.

  10. Re:quothe the poster by Hal_Porter · · Score: 5, Funny

    Q)Why did the multithreaded chicken cross the road?
    A)to To other side. get the

    Q)Why did the multithreaded chicken cross the road?
    A)other to side. To the get

    --
    echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  11. Re:Look at the dates, Dude. by Anonymous Coward · · Score: 1, Funny

    Everytime I see a win32 API I have to weep. I'm really wondering what drugs their engineers are on, and they can't be good ones.

  12. Re:quothe the poster by Korin43 · · Score: 4, Funny

    What are you talking about? Plenty of people code for Windows, we call them "virus writers". ;)

  13. Re:quothe the poster by mustafap · · Score: 4, Funny

    >Get it right, assmuch. It's Linsucks or Linsux.

    It's GNU/Linsux you bastards! When are you going to get it right! Arghh!

    --
    Open Source Drum Kit, LPLC deve board - mjhdesigns.com
  14. Submitter is nuts by trainsnpep · · Score: 3, Funny

    We have always been at war with Pthreads. We have never been at war with Windows threads.

    The submitter is clearly nuts. Everyone knows that we have always been at war with Windows threads. Anyone who suggests we're at war with Pthreads is insane.

    --
    --<Mike>--
  15. Re:PThreads is better by Anonymous Coward · · Score: 1, Funny

    You're saying you typoed "semaphores" as "mutexes"? Wow, that's a hell of a finger-slip. Anyway, fuck you. Oops, sorry about that typo, I meant "take care."

  16. Re:quothe the poster by 0xABADC0DA · · Score: 5, Funny

    Q) Which came first, the multithreaded chicken or the multithreaded egg?
    A) They came at the same time, but the multithreaded chicken terminated first.

    Q) Which came first, the multithreaded chicken or the multithreaded egg?
    A) Neither; mt egg could not acquire chicken-lock from mt chicken. mt chicken could not acquire egg-lock from mt egg.

    Q) Which came first, the multithreaded chicken or the multithreaded egg?
    A) Multithreaded egg, but it overwrote its DNA while still in use and became mt turkey.