Async Programming

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

5 earlier thoughts

0

Twisted, and other event loop based software, is built around the idea of cooperative multi-threading. As a programming model, cooperative multi-threading requires explicit switching points - between switching points, you can assume exclusive access to any data shared only with other cooperating threads.

The gain is that a lot of the complexity of locking from the preemptive model can simply go away. The downside is that software written assuming the preemptive model becomes harder to use (you have to spin it out to a separate OS level thread).

5 later thoughts