
27 Nov
2007
27 Nov
'07
2:57 p.m.
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