diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 11:06:55 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 11:06:55 +0000 |
commit | e770d8a0143378f56141ead28515e58358607ce5 (patch) | |
tree | 7348d46d9e45f0901e344101a049c403c661eb12 /lib/server | |
parent | 08246988b6151f949145b851acda799816cb8586 (diff) |
Call virtual NotifyListenerIsReady() method when listening socket is
ready, for Boxi thread synchronisation.
Diffstat (limited to 'lib/server')
-rw-r--r-- | lib/server/ServerStream.h | 14 |
1 files changed, 11 insertions, 3 deletions
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()) { |