
16 Oct
2010
16 Oct
'10
11:11 a.m.
On Fri, Oct 15, 2010 at 12:00 AM, Bas van Dijk
When you throw an asynchronous exception to a thread which is executing: `runInUnboundThread m`, m will keep executing and there's no way to kill it.
I realize this isn't true. It's easy to kill 'm': import Control.Concurrent main = do mv <- newEmptyMVar let m = myThreadId >>= putMVar mv runInUnboundThread m takeMVar mv >>= killThread However I still believe my proposed version is better because I see `runInUnboundThread m` as just an optimized version of 'm'. In this perspective, `runInUnboundThread m` should behave as 'm' as much as possible. This means that asynchronous exception thrown to `runInUnboundThread m` should be thrown to 'm'. Bas