base: Have the argument of mask restore the state.
authorFacundo Domínguez <facundo.dominguez@tweag.io>
Mon, 19 Oct 2015 16:16:55 +0000 (18:16 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 19 Oct 2015 16:17:03 +0000 (18:17 +0200)
The implementation of `mask` and `uninterruptibleMask` assumed so far
that the restore argument would be called in a context with the same
masking state as that set by `mask` or `uninterruptibleMask`.

This patch has the restore argument restore the masking, whatever the
current masking state is.

Test Plan: validate

Reviewers: simonmar, hvr, austin, bgamari

Reviewed By: bgamari

Subscribers: thomie, qnikst

Differential Revision: https://phabricator.haskell.org/D1327

GHC Trac Issues: #10149


No differences found