Apart form it being complex to review, my only concern is the chance of regression. I think after the external acquisition issue is fixed, the blocked queue implementation should be changed to use a worker thread, but @hverbeet may not agree. I haven't looked at it recently but I think the problem with the proton implementation was it tries to flush the queue up to the point where it's acquired, but a blocked wait could be in the queue, and if the same thread is supposed to submit the unblocking signal to another queue after the Present, it deadlocks.