2 ms·
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 yo
by FooBarWidget 15y ago
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.
- fauigerzigerk 15y agoI 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.