On Fri, 20 Nov 2009 09:51:49 -0800, sturlamolden wrote: > You can make a user-space scheduler and run a 100000 tasklets on a > threadpool. But there is a GIL in stackless as well. > > Nobody wants 100000 OS threads, not with Python, not with Go, not with > C. > > Also note that Windows has native support for "taskelets", regardless > of language. They are called "fibers" (as opposed to "threads") and > are created using the CreateFiber system call. I would not be > surprised if Unix'es has this as well. We do not need Stackless for > light-weight threads. We can just take Python's threading modules' C > code and replace CreateThread with CreateFiber.
POSIX.1-2001 and POSIX.1-2004 have makecontext(), setcontext(), getcontext() and swapcontext(), but obsoleted by POSIX.1-2008. They are available on Linux; I don't know about other Unices. -- http://mail.python.org/mailman/listinfo/python-list