David Mertz: <a href="http://www-106.ibm.com/developerworks/linux/library/l-pythrd.html">Implementing "weightless threads" with Python generators</a>


David Mertz: Implementing "weightless threads" with Python generators

11.06.2002, 10:48 · Martin · Permalink

"In an earlier "Charming Python" installment, David introduced a way of simulating full-fledged coroutines with generators and a simple scheduler. It is possible to extend this scheduler in straightforward ways to allow extremely lightweight threading of multiple processes. Much as with Stackless Python microthreads, pseudo-coroutine "weightless threads" require almost none of the context switch and memory overhead of OS -- or even userland -- threads. Here David introduces weightless threads as an elegant solution for problems whose natural solutions involve large numbers of cooperating processes."
[via ZopeNewbies]


alles Bild, Text und Tonmaterial ist © Martin Spernau, Verwendung und Reproduktion erfordert die Zustimmung des Authors

Martin Spernau
© 1994-2026


amazon.de Wunschliste

Facebook me!
Google+

powered by Traumtank