Can we use the predicate wait method in other processes (1 min or more, depending on the requirement), then if it satisfies, then forcibly unblock the queue for the second process, and then block it for pressing and unlocking after reading?
See below for more details.
http://en.cppreference.com/w/cpp/thread/condition_variable/wait
Edit:
We cannot unlock internal locks, I thought you manually block the queue using
scoped_lock lock (mutex);
This way you can unlock using predicate_wait when you are done, then open it. from another process.
source
share