
One issue with your solution could be having a spurious wake up (http://vladimir_prus.blogspot.ca/2005/07/spurious-wakeups.html) after doing nc->wait(lock);. Wrapping this wait in a while loop will prevent that from happening. Another problem I can see is that your second process cleans up everything before your first process wakes up as nc->notify_all(); is not a blocking call. So the two problems I can see is that your first process could continue after the wait as its not in a loop due to spurious wake ups and if it does wait your second process will delete everything after the notify_all() call as it is running under a scoped mutex and so only after exiting from scope in process 2 will process 1 be able to claim the mutex but by now everything is deleted. -- View this message in context: http://boost.2283326.n4.nabble.com/Boost-Interprocess-mutex-with-condition-v... Sent from the Boost - Users mailing list archive at Nabble.com.