[libdispatch-dev] Question about event handling in libdispatch

Dave Zarzycki zarzycki at apple.com
Thu Sep 2 12:50:14 PDT 2010


On Sep 1, 2010, at 10:09 AM, cee1 wrote:

> 2010/9/1 Robert Watson <robert at fledge.watson.org>
> 
> This seemed to work quite well -- the one real downside to the current GCD API is that it required a moderate amount of book-keeping in the consumer to handle suspending dispatch sources.  
> Do we need some APIs like putting a set of sources in a group, and then can suspend/resume them all?

I don't see why we should. GCD would end up implementing the same trivial code the end developer would: a few lines of code wrapping a dictionary (a.k.a. hash-table / associative-array) or an array of sources.

> Also libdispatch will not remove/disable a kevent associating with suspending sources, implementing that feature may incur some overhead(Since we need check all sources associating with a kevent).

If that ever becomes a problem in practice, we can change the code.

davez

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/libdispatch-dev/attachments/20100902/63e1d0fd/attachment.html>


More information about the libdispatch-dev mailing list