[Haskell-cafe] Re: Bound threads

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sat Feb 26 07:13:49 EST 2005


Wolfgang Thaller <wolfgang.thaller at gmx.net> writes:

>> Since the main thread is bound, and unbound threads are never executed
>> on an OS thread which has some Haskell thread bound, this would imply
>> that when the main thread spawns a Haskell thread and they synchronize
>> a lot with each other using MVars, the synchronization needs OS-thread
>> synchronization - the threads will not execute on a the same OS thread.
>
> Correct.

Is it important which thread executes Haskell code (I bet no) and
unsafe foreign calls (I don't know)? If not, couldn't the same OS
thread execute code of both threads until a safe foreign call is made?

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Haskell-Cafe mailing list