ThreadReturnType BaseTCPServer::TCPServerLoop(void* tmp) { #ifdef _WINDOWS SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL); #endif if (tmp == 0) { THREAD_RETURN(nullptr); } BaseTCPServer* tcps = (BaseTCPServer*) tmp; #ifndef WIN32 _log(COMMON__THREADS, "Starting TCPServerLoop with thread ID %d", pthread_self()); #endif tcps->MLoopRunning.lock(); while (tcps->RunLoop()) { Sleep(SERVER_LOOP_GRANULARITY); tcps->Process(); } tcps->MLoopRunning.unlock(); #ifndef WIN32 _log(COMMON__THREADS, "Ending TCPServerLoop with thread ID %d", pthread_self()); #endif THREAD_RETURN(nullptr); }
thread_return_t BaseTCPServer::TCPServerLoop( void* arg ) { BaseTCPServer* tcps = reinterpret_cast<BaseTCPServer*>( arg ); assert( tcps != NULL ); THREAD_RETURN( tcps->TCPServerLoop() ); }
ThreadReturnType BaseTCPServer::TCPServerLoop( void* arg ) { BaseTCPServer* tcps = reinterpret_cast<BaseTCPServer*>( arg ); assert( tcps != NULL ); return tcps->TCPServerLoop(); }