Fix dropped event registrations
authorBen Gamari <ben@smart-cactus.org>
Mon, 1 Jun 2015 07:27:30 +0000 (02:27 -0500)
committerAustin Seipp <austin@well-typed.com>
Mon, 1 Jun 2015 14:58:56 +0000 (09:58 -0500)
commit1c3832597b3e75456fc61628c4cd289d211c733b
treeafdfa2ff5546aa8dacf396a3e77b0a87415613b5
parente8a72548884beb94586041900562e55883d85189
Fix dropped event registrations

D347 introduced a bug wherein the event manager would drop registrations that
should be retained during processing. This occurs when an fd has multiple
registrations, not all of which fire, as well as the case of multi-shot
registrations.

I also do some general house-keeping, try to better document things, and fix a
bug which could result in unnecessary calls to `epoll_ctl`

Reviewed By: austin

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

GHC Trac Issues: #10317
libraries/base/GHC/Event/Internal.hs
libraries/base/GHC/Event/Manager.hs