0

Is there a way I can create a new (or associate an existing) dispatch queue and tie it to a specific thread?

I have an AudioUnit callback proc running on a thread I do not control and would like, prior to executing the callback proper, check if some given queue has any block for me to process within that AudioUnit thread.

I can probably use OSAmtomicEnqueue and friends, but was wondering whether GCD already offered some kind of "escape" allowing me to tie a specific thread to a specific queue?

1

1 Answer 1

1

According to Apple'doc, the answer is no.

GCD provides and manages FIFO queues to which your application can submit tasks in the form of block objects. Blocks submitted to dispatch queues are executed on a pool of threads fully managed by the system. No guarantee is made as to the thread on which a task executes.

Sign up to request clarification or add additional context in comments.

1 Comment

Too bad ... atomic stuff it will be then :-(

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.