(socket server) instead of busy looping with a sleep, only wake up the GC thread when a new thread will have to be joined, (we know that thanks to the ConnectionState OnSetTerminated callback
This commit is contained in:
@ -117,5 +117,10 @@ namespace ix
|
||||
|
||||
// to wake up from select
|
||||
SelectInterruptPtr _acceptSelectInterrupt;
|
||||
|
||||
// used by the gc thread, to know that a thread needs to be garbage collected
|
||||
// as a connection
|
||||
std::condition_variable _conditionVariableGC;
|
||||
std::mutex _conditionVariableMutexGC;
|
||||
};
|
||||
} // namespace ix
|
||||
|
Reference in New Issue
Block a user