If Scheme is so good why MIT drops it?
Paul Rubin
http
Wed Jul 22 20:27:23 EDT 2009
Carl Banks <pavlovevidence at gmail.com> writes:
> I don't think your fantasy async-only all-green-thread langauge
> implementation is possible anyway.
Erlang and GHC both work like that, quite successfully:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=threadring&lang=all
> How would you wait on a pipe in one thread, a socket in another, a
> semaphore in a third?
You can select on pipes and sockets, I think. Not sure about
semaphores.
> (Are there any popular OSes that offer a unified polling interface to
> all possible synchronizations?) And what do you do about drivers or
> libraries that make underlying blocking calls? What if you have a
> busy calculation going on in the background?
I don't think the concept of "drivers" applies to user-mode programs.
For FFI calls you would use an OS thread. The language runtime
switches between busy computation threads on a timer tick.
More information about the Python-list
mailing list