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:
@@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user