
1 Mar
2005
1 Mar
'05
6:47 a.m.
On Tuesday 01 March 2005 12:20, Marcin 'Qrczak' Kowalczyk wrote:
Marcin 'Qrczak' Kowalczyk
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.
Which OS? Ben