Opened 12 years ago

Closed 12 years ago

#5144 closed Bugs (wontfix)

interprocess_condition does not support interprocess_recursive_mutex

Reported by: thomas.wilczek@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

on POSIX systems: do_wait() and do_timed_wait() methods are only implemented for interprocess_mutex so compilation fails for all other types.

possible solution: make the mutex type in those methods a template parameter and add interprocess_condition as friend to interprocess_recursive_mutex (for access to m_mut, see interprocess_mutex)

Change History (1)

comment:1 by Ion Gaztañaga, 12 years ago

Resolution: wontfix
Status: newclosed

Recursive mutexes are not usable with condition variables in POSIX for some good reasons. For instance, if a recursively locked mutex were used with a condition variable, the unlock performed for a condition wait would not actually release the mutex, no other thread can satisfy the condition of the predicate, and the thread would wait indefinitely.

Note: See TracTickets for help on using tickets.