SpiecsEngine
 
Loading...
Searching...
No Matches

◆ Loop()

void Spices::Net::EventLoop::Loop ( )

Start Event Loop.

Definition at line 48 of file EventLoop.cpp.

49 {
50 m_IsLooping = true;
51 m_IsQuit = false;
52
53 while (!m_IsQuit)
54 {
55 m_ActiveChannels.clear();
57
58 for (Channel* channel : m_ActiveChannels)
59 {
60 channel->HandleEvent();
61 }
62
64 }
65
66 m_IsLooping = false;
67 }
void DoPendingFunctors()
Execute all pending functors.
std::shared_ptr< Poller > m_Poller
Poller instance.
Definition EventLoop.h:148
std::atomic_bool m_IsLooping
True if is in Looping.
Definition EventLoop.h:128
std::atomic_bool m_IsQuit
True if is quit from Looping.
Definition EventLoop.h:133
ChannelList m_ActiveChannels
Channels with events.
Definition EventLoop.h:163
constexpr uint32_t pollTimeoutMs
Poller timeout. Default is 10s.
Definition EventLoop.cpp:20

Referenced by SpicesTest::TEST(), and Spices::Net::EventLoopThreadPool::ThreadFunc().