Opened 5 years ago
Closed 5 years ago
#13115 closed Support Requests (obsolete)
shared_mutex's exclusive_waiting_blocked may cause deadlock if readers have some dependency.
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | thread |
Version: | Boost 1.53.0 | Severity: | Regression |
Keywords: | Cc: |
Description
I'm using boost::shared_mutex for the reader/writer. My readers have some kinds of dependency which mean Reader A will exit only after Reader B finish. At this situation, exclusive_waiting_blocked will block other readers even when there exists some readers already get the shared_lock, which cause the deadlock.
I suppose if there are readers already hold the shared_lock, other readers should be able to gain the shared_lock as well. unique_lock should exclude other readers only when all existing readers are done. Do I make sense?
Is this a semantic unclear? Any solution to fix my problem? Is there any reader-biased shared_lock in boost?
Change History (5)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 5 years ago
Type: | Bugs → Support Requests |
---|
Moved to support request until we have a better understanding of the issue
comment:5 by , 5 years ago
Resolution: | → obsolete |
---|---|
Status: | assigned → closed |
Closed as there is no follow up.
Concrete code will help to understand.