One-shot semantics in GHC event manager

Ben Gamari bgamari.foss at
Sat Oct 11 16:17:45 UTC 2014

Andreas Voellmy <andreas.voellmy at> writes:

> On Sat, Oct 11, 2014 at 1:07 AM, Ben Gamari <bgamari.foss at> wrote:
>> Thanks for your quick reply!
>> What I'm wondering is what the extra complexity bought us. It seems like
>> the same thing could have been achieved with less breakage by making
>> this per-fd instead of per-manager. I may be missing something, however.
> Generally, ONE_SHOT helped improve performance.
Sure, I would certainly believe this.

> I agree with you that it may be possible to do this on a per-FD
> basis. I'll look into what it would take to do this.
I've started playing around with the code to see what might be possible
here. We'll see how far I get.

>> I had considered this but looked for other options for two reasons,
>>  * `loop` isn't exported by GHC.Event
> Right - it wouldn't make sense to export the system EventManager's loop.
The system EventManager's loop is `GHC.Event.Manager.loop`, no?

> However, the GHC.Event.Manager module does export its loop function, so if
> you create your own non-ONE_SHOT event manager, you can just invoke its
> loop function.
Right, but `GHC.Event.Manager` is not exported by `base`.


- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list