Hi,
How can I get a current depth of a DispatchQueue? I cannot find any information about it.
Hi,
How can I get a current depth of a DispatchQueue? I cannot find any information about it.
Unsure what you mean exactly, but:
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.
Thanks to all, that's exactly what I wanted to know.