One-shot semantics in GHC event manager

Ben Gamari bgamari.foss at gmail.com
Wed Oct 22 05:45:14 UTC 2014


Kazu Yamamoto <kazu at iij.ad.jp> writes:

> Ben,
>
> I have some comments and questions about your code:
>
> C: registerFd' is exported. So, it should have document.
>
It is documented [1] in the 7.10 branch. I didn't bother to bring this patch
over to 7.8 (although I will do so when it becomes clear that this is
going in to 7.8.4).

> Q: Since registerFd uses OneShot and threadWait uses registerFd, basic
>    IO functions use OneShot by default. No changes from GHC 7.8.3. Do
>    I understand correctly?
>
That is the idea. That being said adding another variant of registerFd
(which as far as I know has three users) for backwards compatibility
seems a bit silly. If we decided to punt on this patch until 7.10 I'd
say we should just change the interface of registerFd. If we are going
to put it in 7.8.4, however, then this isn't as clear.

> Q: dbus library will use registerFd' to specify MultiShot, right?
>
I'm not sure about dbus but this is how usb will use it, yes. Does dbus
also use the event manager directly?

Cheers,

- Ben


[1] https://github.com/bgamari/ghc/commit/fb948ef1cdb92419b88fb621edee19d644a26027
-------------- 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/20141022/383525f6/attachment.sig>


More information about the ghc-devs mailing list