Re:Why threads vs events is a nonsensical question.
by FooBarWidget on Sunday August 21, 2011 @04:03AM
(#2908751)
I don't see that as spaghetti code at all, especially when you want to handle other things while the read() or write() is blocked. Callback-style code allows you to see the interleaving of events. If you use threads then the interleaving is non-obvious.
[ Parent
| on HN ]
Re:Why threads vs events is a nonsensical question.
by fauigerzigerk on Sunday August 21, 2011 @04:10AM
(#2908764)
I guess if you don't see the interleaving in log(write(process(read(source)))) our mental models are too different to merit further discussion of this aspect.
And of course thread based code can do other things as well during blocking IO - on other threads.