One-shot semantics in GHC event manager
Ben Gamari
bgamari.foss at gmail.com
Sat Oct 11 16:17:45 UTC 2014
Andreas Voellmy <andreas.voellmy at gmail.com> writes:
> On Sat, Oct 11, 2014 at 1:07 AM, Ben Gamari <bgamari.foss at gmail.com> 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`.
Cheers,
- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141011/20d58894/attachment.sig>
More information about the ghc-devs
mailing list