[libdispatch-dev] Some questions about source handling

fykcee1 at gmail.com fykcee1 at gmail.com
Sat Dec 11 05:03:29 PST 2010


2010/12/11 Dave Zarzycki <zarzycki at apple.com>
>
> You would not want to implement a stream of keyboard events with an "is
> level" dispatch source. This is because users expect that keyboard events
> are not lossy, and a dispatch "is level" source would only tell your code
> what the last key press was, not the list of key presses that haven't been
> handled yet. A dispatch queue would be appropriate in this scenario.
>
Yeah, you are right, I didn't consider it thoroughly, sorry.

But I still think we need such custom sources: in some cases like fire
multi-times and will only process the last value (like
threading.Event<http://www.python.org/doc//current/library/threading.html#threading.Event>API
in python).




-- 
Regards,

- cee1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/libdispatch-dev/attachments/20101211/88adea8f/attachment.html>


More information about the libdispatch-dev mailing list