mirror of
https://github.com/znc/znc.git
synced 2026-07-05 17:31:06 +02:00
Threaded DNS: Handle spurious wakeups
As DarthGandalf noticed, POSIX allows spurious wakeups from pthread_cond_wait. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
@@ -149,6 +149,11 @@ private:
|
||||
static void* TDNSThread(void* argument);
|
||||
static void DoDNS(TDNSArg *arg);
|
||||
|
||||
/** Must be called with threadStatus->mutex held.
|
||||
* @returns false when the calling DNS thread should exit.
|
||||
*/
|
||||
static bool ThreadNeeded(struct TDNSStatus* status);
|
||||
|
||||
TDNSStatus m_threadStatus;
|
||||
#endif
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user