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: yangyihao1992@… 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 viboes, 5 years ago

Concrete code will help to understand.

comment:2 by viboes, 5 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:3 by viboes, 5 years ago

Type: BugsSupport Requests

Moved to support request until we have a better understanding of the issue

comment:4 by viboes, 5 years ago

Are you on Windows platform?

comment:5 by viboes, 5 years ago

Resolution: obsolete
Status: assignedclosed

Closed as there is no follow up.

Note: See TracTickets for help on using tickets.