dsendkowski
(Dariusz Sendkowski)
1
Hi,
How can I get a current depth of a DispatchQueue? I cannot find any information about it.
glessard
(Guillaume Lessard)
2
Unsure what you mean exactly, but:
- There is no set maximum capacity to the queue, other than running out of memory.
- You can't probe the queue to see how many blocks are currently enqueued.
Lantua
4
As said, DispatchQueue has no such api. You'll probably need to implement them yourself like custom counter, semaphore if you have a hard upper bound, or even Little's law (when long term statistics is similar to short term one) if you're feeling fancy.
dsendkowski
(Dariusz Sendkowski)
5
Thanks to all, that's exactly what I wanted to know.