mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Update call_slot() API, inform caller if slot cannot be queued
It can happen that ::get_request() returns NULL if the EventPool is full. In that case the slot is never called. In this case the caller can now take action.
This commit is contained in:
parent
03e0fe0a73
commit
95aa39d1c4
5 changed files with 15 additions and 9 deletions
|
|
@ -109,7 +109,7 @@ public:
|
|||
run_loop_thread = Glib::Threads::Thread::self ();
|
||||
}
|
||||
|
||||
void call_slot (InvalidationRecord* ir, const boost::function<void()>& f)
|
||||
bool call_slot (InvalidationRecord* ir, const boost::function<void()>& f)
|
||||
{
|
||||
if (Glib::Threads::Thread::self () == run_loop_thread) {
|
||||
cout << string_compose ("%1/%2 direct dispatch of call slot via functor @ %3, invalidation %4\n", event_loop_name (), pthread_name (), &f, ir);
|
||||
|
|
@ -119,6 +119,7 @@ public:
|
|||
assert (!ir);
|
||||
f (); // XXX TODO, queue and process during run ()
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void run ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue