[libdispatch-dev] Queue size
leimy2k at gmail.com
Tue Sep 28 15:37:06 PDT 2010
Your question makes me feel like I should try to clarify my understanding of
queues in libdispatch. Here goes:
There's only one concurrent queue in which the "tasks" or blocks/function
pointers can be run in simultaneously as far as I can tell. Every other
queue is serial, and the queues themselves may run in parallel and with
This is why it makes sense to think of a queue as a context, and that you're
serializing accesses to that context by enqueueing accesses and updates to
that queue. The programmer's benefit in this situation is that they can
isolate queue contextual data in a nice way without thinking about mutexes
or semaphores etc, and the queues are really pretty inexpensive as can be
seen in the game of life demo sample code in libdispatch which I think is
using a queue per discrete element.
On Tue, Sep 28, 2010 at 1:30 PM, Danilo Egea <daniloegea at yahoo.com.br>wrote:
> First, sorry my english...
> Are possible define the queue size in GCD?
> Example: Define the max. number of task run simultaneous in a queue.
> Danilo Egêa Gondolfo
> Email/MSN - daniloegea at yahoo.com.br
> Skype - daniloegea
> Twitter - http://twitter.com/daniloegea
> Blog - http://daniloegea.wordpress.com
> Fale com seus amigos de graça com o novo Yahoo! Messenger
> libdispatch-dev mailing list
> libdispatch-dev at lists.macosforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libdispatch-dev