Fix hClose002 with the threaded RTS IO manager
authorIan Lynagh <ian@well-typed.com>
Sun, 16 Jun 2013 19:16:19 +0000 (20:16 +0100)
committerIan Lynagh <ian@well-typed.com>
Sun, 16 Jun 2013 19:16:19 +0000 (20:16 +0100)
commit80b02b2a1ebd84c853a9479a7a36c923058e7ce8
tree796106cfa054ce80e131585629598c637a4b2acf
parent9afb9289c03e922c2c1a4698ad114818a87c7512
Fix hClose002 with the threaded RTS IO manager

If 'close fd' failed, then the MVars in the callbackTables would be
left empty, which caused deadlocks when we tried to 'take' them again.

Now we use 'finally' to ensure that they are refilled even if 'close'
throws an exception.
GHC/Event/Thread.hs