From e770d8a0143378f56141ead28515e58358607ce5 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 21 Aug 2008 11:06:55 +0000 Subject: Call virtual NotifyListenerIsReady() method when listening socket is ready, for Boxi thread synchronisation. --- lib/server/ServerStream.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/server/ServerStream.h b/lib/server/ServerStream.h index 41899e78..c7d81740 100644 --- a/lib/server/ServerStream.h +++ b/lib/server/ServerStream.h @@ -120,13 +120,19 @@ public: } } +protected: + virtual void NotifyListenerIsReady() { } + +public: virtual void Run2(bool &rChildExit) { try { - // Wait object with a timeout of 10 seconds, which is a reasonable time to wait before - // cleaning up finished child processes. - WaitForEvent connectionWait(10000); + // Wait object with a timeout of 1 second, which + // is a reasonable time to wait before cleaning up + // finished child processes, and allows the daemon + // to terminate reasonably quickly on request. + WaitForEvent connectionWait(1000); // BLOCK { @@ -218,6 +224,8 @@ public: } } } + + NotifyListenerIsReady(); while(!StopRun()) { -- cgit v1.2.3