[Haskell-cafe] Re: Waiting for thread to finish
Maurício
briqueabraque at yahoo.com
Tue Nov 27 14:57:19 EST 2007
>> Hi,
>>
>> After I have spawned a thread with 'forkIO',
>> how can I check if that thread work has
>> finished already? Or wait for it?
>>
> The best way to do this is using
> Control.Exception.finally: (...)
>
> These techniques are needed because forkIO is a
> very lightweight threading mechanism. Adding
> precisely the features you need makes for good
> performance control, as seen in the great
> computer language shootout benchmarks.
Changing ugly code for bad performance is not that
usual in Haskell code :(
Best,
Maurício
More information about the Haskell-Cafe
mailing list