OpenShot Library | libopenshot-audio
0.2.0
|
59 activeMessage->shouldDeliver.set (0);
66 JUCE_ASSERT_MESSAGE_MANAGER_EXISTS
68 if (activeMessage->shouldDeliver.compareAndSetBool (1, 0))
69 if (! activeMessage->post())
76 activeMessage->shouldDeliver.set (0);
82 JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
84 if (activeMessage->shouldDeliver.exchange (0) != 0)
90 return activeMessage->shouldDeliver.value != 0;
void messageCallback() override
Called when the message is delivered.
AsyncUpdater()
Creates an AsyncUpdater object.
void triggerAsyncUpdate()
Causes the callback to be triggered at a later time.
bool isUpdatePending() const noexcept
Returns true if there's an update callback in the pipeline.
bool compareAndSetBool(Type newValue, Type valueToCompare) noexcept
Atomically compares this value with a target value, and if it is equal, sets this to be equal to a ne...
void handleUpdateNowIfNeeded()
If an update has been triggered and is pending, this will invoke it synchronously.
virtual ~AsyncUpdater()
Destructor.
A message that invokes a callback method when it gets delivered.
void cancelPendingUpdate() noexcept
This will stop any pending updates from happening.
Has a callback method that is triggered asynchronously.
static MessageManager * getInstanceWithoutCreating() noexcept
Returns the global instance of the MessageManager, or nullptr if it doesn't exist.
virtual void handleAsyncUpdate()=0
Called back to do whatever your class needs to do.