9 #ifndef __PDG_EventQueue_h__
10 #define __PDG_EventQueue_h__
32 using EventInfo = std::pair<const PDG_EventEmitter*, PDG_Event>;
48 void pause() { myPauseRequests.add(1); }
49 void resume() { myPauseRequests.add(-1); }
70 #if PDG_EVENT_QUEUE_DEBUG
74 static void* run(
void*
param);
76 bool myTerminate =
false;
77 bool myWaitingEvents =
false;
81 UT_ConcurrentSet<PDG_EventEmitter*> myEmitters;
82 UT_ConcurrentQueue<EventInfo> myEvents;
86 static constexpr
int theSleepTime = 10;
std::pair< const PDG_EventEmitter *, PDG_Event > EventInfo
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the queue
ScopedPause(PDG_EventQueue *queue)
Reader/Writer mutex class.