SpiecsEngine
 
Loading...
Searching...
No Matches

◆ RunInLoop()

void Spices::Net::EventLoop::RunInLoop ( Functor cb)

Push functor to pending functors.

Parameters
[in]cbFunctor.

Definition at line 79 of file EventLoop.cpp.

80 {
81 if (IsInLoopThread())
82 {
83 cb();
84 }
85 else
86 {
87 QueueInLoop(cb);
88 }
89 }
bool IsInLoopThread() const
Determine if current thread is in eventloop thread.
Definition EventLoop.h:109
void QueueInLoop(Functor cb)
Execute functor in EventLoop thread.
Definition EventLoop.cpp:91

References IsInLoopThread().