[Haskell-cafe] Re: Bound threads
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Tue Mar 1 06:20:31 EST 2005
Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> writes:
> Why is the main thread bound?
I can answer myself: if the main thread is unbound, the end of the
program can be reached in a different OS thread, which may be a
problem if we want to return cleanly to the calling code.
I've now implemented a threaded runtime in my language Kogut, based
on the design of Haskell. The main thread is bound. The thread which
holds the capability performs I/O multiplexing itself, without a
separate service thread.
Producer/consumer ping-pong is 15 times slower between threads running
on different OS threads than on two unbound threads.
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
More information about the Haskell-Cafe