Skip to content

Commit

Permalink
Even fewer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
codemercenary committed May 21, 2016
1 parent b157a6c commit a754567
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/autowiring/DispatchQueue.cpp
Expand Up @@ -97,14 +97,10 @@ void DispatchQueue::TryDispatchEventUnsafe(std::unique_lock<std::mutex>& lk) {
}

void DispatchQueue::Abort(void) {
// Wake up anyone who is still waiting when we return
auto x = MakeAtExit([this] { m_queueUpdated.notify_all(); });

DispatchThunkBase* pHead;
std::priority_queue<autowiring::DispatchThunkDelayed> delayedQueue;

// Do not permit any more lambdas to be pended to our queue
DispatchThunkBase* pHead;
{
std::priority_queue<autowiring::DispatchThunkDelayed> delayedQueue;
std::lock_guard<std::mutex> lk(m_dispatchLock);
onAborted();
m_dispatchCap = 0;
Expand All @@ -127,6 +123,9 @@ void DispatchQueue::Abort(void) {
// Decrement the count by the number of entries we actually traversed. Abort may potentially
// be called from a lambda function, so assigning this value directly to zero would be an error.
m_count -= nTraversed;

// Wake up anyone who is still waiting:
m_queueUpdated.notify_all();
}

bool DispatchQueue::Cancel(void) {
Expand Down

0 comments on commit a754567

Please sign in to comment.