Skip to content

Commit

Permalink
Fixed|libcore|TaskPool: Completing a pool while it is being destroyed
Browse files Browse the repository at this point in the history
The allTasksDone() signal was emitted after unlocking, which meant that
a destructor waiting on the mutex would get a chance to complete too
early.
  • Loading branch information
skyjake committed Oct 22, 2014
1 parent d97cbbb commit 8bc2b8c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions doomsday/libcore/src/concurrency/taskpool.cpp
Expand Up @@ -102,14 +102,10 @@ DENG2_PIMPL(TaskPool), public Lockable, public Waitable, public TaskPool::IPool
}
else
{
unlock();
emit self.allTasksDone();
}
}
else
{
unlock();
}
unlock();
}
};

Expand Down

0 comments on commit 8bc2b8c

Please sign in to comment.