tag:blogger.com,1999:blog-32049549.post8653411735017600206..comments2023-11-02T08:35:02.778-07:00Comments on A Nickel's Worth: The Icarus UltimatumJacob Gabrielsonhttp://www.blogger.com/profile/13887274100244616103noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-32049549.post-3247130872347996632007-09-12T14:54:00.000-07:002007-09-12T14:54:00.000-07:00Echoing what denis bider said, it's not threads th...Echoing what denis bider said, it's not threads that are dangerous, it's the <I>interfaces</I> between them that can be if they're too complex or large in scope. Simple queue based message passing (e.g. Erlang) is hard to get wrong. Having a hundred shared interdependent objects is hard to get right.<BR/><BR/>It's possible to have a purely event based system with one thread, using things like async IO, but library functions that block but don't have an async version always seem to gum up the works. For example, <A HREF="http://blogs.technet.com/markrussinovich/archive/2006/11/27/532465.aspx" REL="nofollow">an app that freezes for no apparent reason on some deep RPC call</A>.Anonymoushttps://www.blogger.com/profile/08720300890850265615noreply@blogger.comtag:blogger.com,1999:blog-32049549.post-28826584390342432262007-09-11T21:58:00.000-07:002007-09-11T21:58:00.000-07:00When people say "don't use threads", what they mea...When people say "don't use threads", what they mean is, don't use locks and monitors to communicate between them. That <I>is</I> a recipe for loads of heisenbugs.<BR/><BR/>However, if you limit your locks and monitors to a small portion of your code which formalizes your message-passing semantics, then your exposure to heisenbugs deriving from your use of locks and monitors is limited to the message-passing implementation. It is therefore just this core that needs to be written by a zen master, and less experienced programmers can write the rest.<BR/><BR/>So, yeah, the "dead" advice is still correct, if properly interpreted. Apparently you just didn't understand what it meant. ;)denis biderhttps://www.blogger.com/profile/02662743799740973736noreply@blogger.com