Final bikeshedding call: Fixing Control.Exception.bracket

John Lato jwlato at gmail.com
Thu Nov 13 17:54:56 UTC 2014


 On 06:58, Thu, Nov 13, 2014 Gregory Collins <greg at gregorycollins.net>
wrote:


On Wed, Nov 12, 2014 at 10:59 PM, John Lato <jwlato at gmail.com> wrote:

Should we update the documentation of hClose to warn that it might not work?

 hClose should be fixed to not leak the file descriptor. :)

 I strongly object to this on the grounds that doing so is very likely to
have unforeseen consequences, and furthermore those in support should
perform due diligence that the change won't lead to deadlocks in currently
working programs.  :)

How about this: when is it correct for a cleanup handler to be interrupted
by an async exception and drop its cleanup action into the void?  I am not
sure that is ever correct, although I can see that it might be useful on
rare occasions.

Merijn pointed out that either a cleanup is not interruptible, in which
case uninterruptibleMask doesn't change the semantics, or it is
interruptible, in which case that's almost certainly a bug.  So why not fix
the problem for all cleanup handlers at once?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20141113/7f461f8a/attachment-0001.html>


More information about the Libraries mailing list