Async Programming

11 thoughts
last posted Jan. 9, 2013, 12:02 p.m.

3 earlier thoughts

0

With a synchronous execution model, the OS level thread itself stops when an operation needs to wait for IO activity. Each concurrent IO operation consumes the resources of an entire OS thread, including the memory for its stack.

The power of an asynchronous execution model is that the individual IO operations are decoupled from OS level threads. So a single thread can dispatch multiple IO operations in parallel, and then receive notifications when the operations are complete. Most importantly, the record keeping for each concurrent IO operation is much less resource intensive than that for entire threads.

7 later thoughts