SpiecsEngine
 
Loading...
Searching...
No Matches

◆ ThreadFunc()

void Spices::Net::EventLoopThreadPool::ThreadFunc ( Thread<> * thread)

Thread Function.

Parameters
[in]threadThread Entity.

Name thread.

Name thread.

Definition at line 48 of file EventLoopThreadPool.cpp.

49 {
51
55 std::stringstream ss;
56 ss << m_PoolName << thread->GetId();
57
59
61
63 {
65 }
66
67 m_Loops[thread->GetId()] = loop;
69
70 loop->Loop();
71 }
#define SPICES_PROFILE_ZONE
ThreadInitCallback m_ThreadInitCallback
ThreadInitCallback.
InetAddress m_ListenAddress
ListenAddress.
semaphore m_IsThreadsPrepared
ThreadsPrepared condition.
std::vector< EventLoop * > m_Loops
All threads EventLoop collection.
static EventLoop *& GetInst(InetAddress *address=nullptr)
Get EventLoop Instance. @reutrn Returns EventLoop Instance.
static bool SetThreadName(const std::string &name)
Set Thread name.
std::string m_PoolName
This ThreadPool Name.
void Increase()
Increase this semaphore sign.
Definition Semaphore.h:45

References Spices::Net::EventLoop::Loop(), and Spices::ThreadLibrary::SetThreadName().