Opened 14 years ago
Closed 14 years ago
#2729 closed Bugs (fixed)
named_condition.hpp does not compile
| Reported by: | Owned by: | Ion Gaztañaga | |
|---|---|---|---|
| Milestone: | Boost 1.39.0 | Component: | interprocess |
| Version: | Boost 1.37.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
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)
Change History (3)
by , 14 years ago
| Attachment: | named_condition.patch added |
|---|
comment:1 by , 14 years ago
| Milestone: | Boost 1.38.0 → Boost 1.39.0 |
|---|
comment:2 by , 14 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Fixed documentation and added compile-time static assertion.
Note:
See TracTickets
for help on using tickets.

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.