Opened 8 years ago

Closed 8 years ago

#2729 closed Bugs (fixed)

named_condition.hpp does not compile

Reported by: yusuke_mitsuki@… Owned by: igaztanaga
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@… 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by yusuke_mitsuki@…

comment:1 Changed 8 years ago by igaztanaga

  • Milestone changed from Boost 1.38.0 to Boost 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 8 years ago by igaztanaga

  • Resolution set to fixed
  • Status changed from new to closed

Fixed documentation and added compile-time static assertion.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain igaztanaga.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.