Ticket #2729 (closed Bugs: fixed)

Opened 8 years ago

Last modified 8 years ago

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


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

Change History

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

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

Fixed documentation and added compile-time static assertion.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
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.