Re:Diesel 2: Using generators for async (and back again)
by wmoss on Tuesday August 10, 2010 @04:23PM
(#1592854)
I think the move to async frameworks is primarily precipitated by the fact that a file handle (which is, essentially, what an async framework holds per connection) is substantially lighter weight than a thread. When you're talking about writing a server that can handle thousands of concurrent connections, threads just become computationally infeasible.
Re:Diesel 2: Using generators for async (and back again)
by mhd on Tuesday August 10, 2010 @06:00PM
(#1593094)
That depends a lot on your OS and your threading mechanism. It used to be pretty bad on Linux for example, but the modern NPTL implementation is much better. And even then it still doesn't mean that your language has to stick to a 1:1 threading model.
The main problem with threads is the relative complexity of the programming and debugging model. I don't really see a complete migration from threads to async, I see a migratino from threads to a multitude of models, where async is just one of them.
I can't quite tell if my perception of this trend is skewed by my current perspective or if there are more people exploring this model of programming. IMHO, some things get much harder to reason about without some good tools.