mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Changed MessageBase::post() to return a bool to detect failure in the OS message queue (which can happen under stress on win32), and used this to avoid some messaging classes getting stuck.
This commit is contained in:
parent
8baa07ac89
commit
7b8ab7b503
3 changed files with 22 additions and 7 deletions
|
|
@ -61,7 +61,9 @@ AsyncUpdater::~AsyncUpdater()
|
|||
void AsyncUpdater::triggerAsyncUpdate()
|
||||
{
|
||||
if (activeMessage->shouldDeliver.compareAndSetBool (1, 0))
|
||||
activeMessage->post();
|
||||
if (! activeMessage->post())
|
||||
cancelPendingUpdate(); // if the message queue fails, this avoids getting
|
||||
// trapped waiting for the message to arrive
|
||||
}
|
||||
|
||||
void AsyncUpdater::cancelPendingUpdate() noexcept
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue