GCD queues can be suspended and resumed with dispatch_suspend and dispatch_resume. Sometimes this is used as synchronization, e.g. in the following example, f1() is always fully executed before f2():
dispatch_suspend(q); dispatch_async(q, ^{ f2(); }); f1(); dispatch_resume(q);
It seems to me that all we need to do is to add synchronization between the call to dispatch_resume and any subsequent executions of blocks in the queue that was resumed. We already have an Acquire(q) before the block executes, so this patch just adds the Release(q) in an interceptor of dispatch_resume.