Beazley on Generators

Paul Rubin http
Wed Apr 1 22:02:48 EDT 2009


Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> writes:
> > However, there are situations when you need thousands of lightweight
> > threads of execution ;;;
> 
> The Linux kernel has been tested running hundreds of thousands of threads.

Those are still heavyweight threads requiring context switches to
switch from one to another.  If you look at the multi-threading
benchmarks in the Alioth shootout, languages with lightweight threads
(such as Erlang or GHC) can switch orders of magnitude faster than
those that use kernel threads.



More information about the Python-list mailing list