Opened 9 years ago

Closed 9 years ago

#2729 closed Bugs (fixed)

named_condition.hpp does not compile

Reported by: yusuke_mitsuki@… Owned by: Ion Gaztañaga
Milestone: Boost 1.39.0 Component: interprocess
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc:


named_condition::wait() causes the compile error with msvc8.

   namespace ip = boost::interprocess;

    ip::interprocess_mutex mtx;
    ip::named_condition cond(ip::create_only, "Test");
    ip::scoped_lock<ip::interprocess_mutex> lock(mtx);

    cond.wait(lock); // error

Attachments (1)

named_condition.patch (639 bytes) - added by yusuke_mitsuki@… 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by yusuke_mitsuki@…

Attachment: named_condition.patch added

comment:1 Changed 9 years ago by Ion Gaztañaga

Milestone: Boost 1.38.0Boost 1.39.0

The documentation says:

"A global condition variable that can be created by name. This condition variable is designed to work with named_mutex and can't be placed in shared memory or memory mapped files."

So a named condition variable can't be used with interprocess_mutex. The documentation of wait functions mentions interprocess_mutex so the documentation of those functions is wrong.

comment:2 Changed 9 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Fixed documentation and added compile-time static assertion.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.