News for hackers. Stuff that matters.
Re:Try It Quiet by robconery on Thursday July 12, 2012 @11:27AM (#4234988)
Async controllers don't solve this problem, they actually create 10 more. Same with tasks - you have thread locking issues, race conditions and other fun async stuff at the thread level. Node is single threaded, (basically) single process.

I get your point - that it's possible (it's always been) - it just isn't the way 99.99999% of the people use it.

Re:Try It Quiet by drub0y on Thursday July 12, 2012 @12:01PM (#4235204)
Eh, that's a little bit of a FUDdy statement. You don't instantly have "locking issues" and/or "race conditions" to worry about just because you use an async controller with the TPL (async keyword in .NET 4.5). The only time you have to deal with locking and race conditions is if the work you're doing is trying to cooperate and/or touching a shared resource (e.g. a static field). In the most common/basic case of receive a web request, fire off a call to a database/remote service asynchronously and wait for it to come back before you continue processing the original request you don't have to worry about anything because you're not sharing any local state and I would hope the database/remote service you're talking to has its own locking.

That's not to say that there aren't merits to node's single threaded execution model in that, _when you do_ need to access a shared resource, you don't have to worry about locking/coordination, but that's a whole other debate. :)