One-shot semantics in GHC event manager
bgamari.foss at gmail.com
Wed Oct 22 05:45:14 UTC 2014
Kazu Yamamoto <kazu at iij.ad.jp> writes:
> I have some comments and questions about your code:
> C: registerFd' is exported. So, it should have document.
It is documented  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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 472 bytes
Desc: not available
More information about the ghc-devs