Fix #4533 - unregister callbacks on exception, fixing a memory leak
authorBryan O'Sullivan <bos@serpentine.com>
Sat, 27 Nov 2010 18:18:26 +0000 (18:18 +0000)
committerBryan O'Sullivan <bos@serpentine.com>
Sat, 27 Nov 2010 18:18:26 +0000 (18:18 +0000)
commit71d2bbf7bca2d446fd6b0d2af97b6d1833314f7f
treee95903c536897a249e36b8797ce9babcea265975
parent774276311da000ed74092b910efb07df802b6a60
Fix #4533 - unregister callbacks on exception, fixing a memory leak

Our problem here was that if a thread blocked in threadWait or
threadDelay and was killed by an exception thrown from another thread,
its registration with the IO manager would not be cleared.

The fix is simply to install exception handlers that do the cleanup and
propagate the exception.
System/Event/Thread.hs