(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:
Benjamin Sergeant
2020-08-15 16:24:35 -07:00
parent 785842de03
commit cd4e51eacf
3 changed files with 22 additions and 4 deletions

View File

@ -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