interprocess
interprocess copied to clipboard
`message_queue::timed_receive` block process a long duration than expect when `system time` jumb back
In my project, I use message_queue::timed_receive to handle inter process messaging.
But in issue scenario, my system clock falled back to 2mins, then timed_receive waited for more than 1s already set in code. This behaviour is not expected.
while (true)
{
// var defination
if (message_queue.timed_receive(&message, sizeof(message), received_size, priority, std::chrono::seconds(1)))
{
handle(message);
}
// other logics
}
My question is for message_queue::timed_receive, does it support steady_clock which is not affected by system time update?