Opened 12 years ago
Closed 12 years ago
#5194 closed Bugs (invalid)
unique_lock::unlock() does not protect modification of is_locked with mutex
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | To Be Determined | Component: | thread |
Version: | Boost 1.45.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Shouldn't first is_locked=false and then m->unlock()? Otherwise is_locked value is undetermined in case of simultaneous calls to lock() and unlock()...
void unlock() { ... m->unlock(); is_locked=false; }
void lock() { ... m->lock(); is_locked=true; }
Change History (1)
comment:1 by , 12 years ago
Component: | None → thread |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
A unique_lock is not intended to be accessed concurrently from multiple threads.