jhen added a comment. To clarify further. The race can occur without submitting tasks while waiting, there just has to be a task in the queue at the time the `wait` is called. That task would have been enqueued before the call to `wait`. http://reviews.llvm.org/D18811