- Library code update
- project update (added Eigen) git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@94 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -25,12 +25,11 @@
|
||||
class ActionBroadcaster::ActionMessage : public MessageManager::MessageBase
|
||||
{
|
||||
public:
|
||||
ActionMessage (const ActionBroadcaster* const broadcaster_,
|
||||
const String& messageText,
|
||||
ActionListener* const listener_) noexcept
|
||||
: broadcaster (const_cast <ActionBroadcaster*> (broadcaster_)),
|
||||
ActionMessage (const ActionBroadcaster* ab,
|
||||
const String& messageText, ActionListener* l) noexcept
|
||||
: broadcaster (const_cast<ActionBroadcaster*> (ab)),
|
||||
message (messageText),
|
||||
listener (listener_)
|
||||
listener (l)
|
||||
{}
|
||||
|
||||
void messageCallback() override
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -68,8 +68,8 @@ public:
|
||||
callback happens, this will cancel the handleAsyncUpdate() callback.
|
||||
|
||||
Note that this method simply cancels the next callback - if a callback is already
|
||||
in progress on a different thread, this won't block until it finishes, so there's
|
||||
no guarantee that the callback isn't still running when you return from
|
||||
in progress on a different thread, this won't block until the callback finishes, so
|
||||
there's no guarantee that the callback isn't still running when the method returns.
|
||||
*/
|
||||
void cancelPendingUpdate() noexcept;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user