[block, lock_checker] add an is_locked() method for use in unit tests.
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user