Shlomi Fish wrote: > >This is the standard "Use qmail instead" reply to "I want to do this with >sendmail". Perhaps pertinent, but not what the one who asked the question >wishes to hear. > I got the idea that the original poster was a young programmer, and wanted to warn him before he got started on his journey into "threadland" of the perils that await him. The streets there are not really paved with gold ...
> >I won't comment further, but I'll just say that some of the problems one >encounters with multi-threading exist in one form or another in >multi-processing. Furthermore, multi-threading waiting for >synchronizations can be avoided by using trylock and friends. This will >require a more complicated design, but is doable. (and there are many >times similar phenomena in multi-processing). > This illustrates what I have said, things start getting complicated when you want your program to work well. You need to develop all sorts of strategies to combat situations that you never expected when you started. In the end, I am not sure that you would have a simpler design than if you had used processes in the beginning. > >I heard an anti-threads rant from a different source, too. However, most >people find problem solving using threads much easier than >multi-processing games, regardless from which OSes they came from. So, >like it or not multi-threading is here to stay. > >Regards, > > Shlomi Fish > In my experience, the initial design phase is simpler using threads, however after the program matures, and after many sleepless nights of debugging, the final implementation is far more complicated than originally designed. Debugging is much harder since the indeterminism of each execution makes replication of bugs ( due to race-conditions ) much harder. You can often tell QA department that you could not recreate their bug report, there is a good chance that they will not be able to repeat it, as well. But you are never sure when this bug will rear its ugly head. Of course, this can happen in multi-processing applications as well, but I do believe that debugging a deterministic process, step by step is far easier. An interesting aside, is that Apache, a prime candidate for multi-threading , was not originally based on threads (multi-threading was added into version 2.0, adding certain problems). Microsofts IIS is of course based on threads, and we all know which server is superior, don't we ;) Regards, Malcolm _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]