Skip to content

Commit

Permalink
libcore|Lockable: Check that mutexes are unlocked before destruction
Browse files Browse the repository at this point in the history
The caller's responsibility is to ensure that locked mutexes are not
deleted.
  • Loading branch information
skyjake committed Oct 21, 2014
1 parent 8c9d2fa commit 5b00c79
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions doomsday/libcore/src/concurrency/lockable.cpp
Expand Up @@ -30,10 +30,7 @@ Lockable::Lockable()

Lockable::~Lockable()
{
while(isLocked())
{
unlock();
}
DENG2_ASSERT(!isLocked()); // You should unlock before deleting!
}

void Lockable::lock() const
Expand Down

0 comments on commit 5b00c79

Please sign in to comment.