in reply to Threading - Best Practices

Don't.

Seriously, before you try it, carefully think through why you want threading. Odds are that you don't, really. And there are a lot of potential things that can go wrong which are really hard to debug (specifically race conditions). Unless you have a good reason to open that can of worms, I wouldn't.

Replies are listed 'Best First'.
Re: Re: Threading - Best Practices
by Anonymous Monk on May 18, 2003 at 00:04 UTC

    /msg p5p cease development on threads, nobody is going to use them. They are too hard.

      Heh.

      The truth is that people will use threads. Why? First of all they are the best solution to certain classes of user interaction problems. Also a lot of people think that they are cool. And programmers who are used to languages or environments where you thread everywhere just find them familiar. Therefore it makes sense for p5p to try to support them.

      What I would like is for people to not get burned by using threads where it doesn't make sense to.

      For one description of why it sometimes doesn't make sense to use them, see Threads vs Forking (Java vs Perl).

        What I would like is for people to not get burned by using threads where it doesn't make sense to.

        Then perhaps answering Don't. isn't the appropriate answer to a question asking for Best Practices?