
29 Apr
2012
29 Apr
'12
5:51 a.m.
On Sat, Apr 28, 2012 at 2:23 PM, H. M.
There are two threads, one which is waits on input via hGetLine and another, which should terminate this thread or close this handle.
hClose as well as killThread doesn't seem to work, caused by the fact, that the thread is blocked until input is availiable.
What OS? GHC currently doesn't have proper IO manager support for Windows. On Windows, IO is performed through FFI calls. An FFI call masks asynchronous exceptions (C code generally doesn't expect to be interrupted at arbitrary points in time). If another thread tries to `killThread` the thread waiting for input, the exception will not be received until the FFI call completes. This means both threads will hang. -Joey