У меня есть код производителя в следующей форме:
Код: Выделить всё
void producer() {
const boost::posix_time::ptime abs_time = boost::get_system_time() + boost::posix_time::microseconds(maxLockTime.count());
boost::interprocess::scoped_lock lock(mutex, boost::interprocess::defer_lock);
if (lock.timed_lock(abs_time)) {
// Write data
// ...
cond.notify_all(); //
Подробнее здесь: [url]https://stackoverflow.com/questions/78790918/how-to-debug-hanging-notify-all-call-in-linux[/url]
Мобильная версия