> I would like to move from a polling (CVDisplayLink) to a event driven > rendering model in my app. I would like to use GCD and named dispatch queues, > but I am concerned about QA 1538 (Multithreaded QCRenderer) : > http://developer.apple.com/library/mac/#qa/qa1538/_index.html > > Specifically, if I have a named dispatch queue, and alloc/init, and render > content in this queue only, is that safe and guideline following? My > understanding is, a queue can bounce around various thread pools, and wont, > technically, be on the same literal thread. Thus my question. > > What say ye? Yay or Nay?
This will be a problem under the current implementation - internally some resources are tied to pthreads (via pthread_set_specific), and that doesn't work so well under GCD, where, as you say, queues can migrate threads. One thing you could do is set up a thread for the renderer that waits on a dispatch_semaphore, and then in the GCD block signal the semaphore when you want it to render. This will add some latency, but it'll remove the polling model without violating the thread guarantees QC currently expects. -- Christopher Wright [email protected] _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

