[block, lock_checker] add an is_locked() method for use in unit tests.

This commit is contained in:
Joe Thornber
2013-04-29 12:31:30 +01:00
parent a0f53f47aa
commit a7c0b0c39b
4 changed files with 21 additions and 0 deletions

View File

@ -116,5 +116,12 @@ lock_tracker::check_key(uint64_t key) const
throw runtime_error("invalid key");
}
bool
lock_tracker::is_locked(uint64_t key) const
{
check_key(key);
return found(locks_.find(key));
}
//----------------------------------------------------------------