mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Changed the spec for mutex::unlock() to say that it is illegal for a thread to
unlock a dlib::mutex it doesn't own. This is technically a non-backwards compatible change to the API but it has always been implemented in a way that didn't allow this kind of double unlock() on non-Windows platforms. Additionally, the recent change to the dlib::mutex implementation on windows also no longer allows this kind of double unlock.
This commit is contained in:
parent
213b0ff14b
commit
68e88433fc
@ -175,11 +175,10 @@ namespace dlib
|
||||
void unlock (
|
||||
) const;
|
||||
/*!
|
||||
requires
|
||||
- the thread calling unlock() already has a lock on *this
|
||||
ensures
|
||||
- if (*this is currently locked and owned by the thread calling unlock) then
|
||||
- #*this is unlocked (i.e. other threads may now lock this object)
|
||||
- else
|
||||
- the call to unlock() has no effect
|
||||
- #*this is unlocked (i.e. other threads may now lock this object)
|
||||
!*/
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user