WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual.
This commit is contained in:
parent
69c5830ef2
commit
c68eb15695
9 changed files with 22 additions and 23 deletions
|
@ -27,7 +27,7 @@ public:
|
|||
std::string name; ///< Name of mutex (optional)
|
||||
SharedPtr<Thread> current_thread; ///< Thread that has acquired the mutex
|
||||
|
||||
ResultVal<bool> Wait() override;
|
||||
ResultVal<bool> ShouldWait() override;
|
||||
ResultVal<bool> Acquire() override;
|
||||
};
|
||||
|
||||
|
@ -159,7 +159,7 @@ Handle CreateMutex(bool initial_locked, const std::string& name) {
|
|||
return handle;
|
||||
}
|
||||
|
||||
ResultVal<bool> Mutex::Wait() {
|
||||
ResultVal<bool> Mutex::ShouldWait() {
|
||||
return MakeResult<bool>(locked && (current_thread != GetCurrentThread()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue