Changeset 2256

Show
Ignore:
Timestamp:
21/08/2008 12:06:55 (3 months ago)
Author:
chris
Message:

Call virtual NotifyListenerIsReady?() method when listening socket is
ready, for Boxi thread synchronisation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • box/trunk/lib/server/ServerStream.h

    r2127 r2256  
    121121        } 
    122122         
     123protected: 
     124        virtual void NotifyListenerIsReady() { } 
     125         
     126public: 
    123127        virtual void Run2(bool &rChildExit) 
    124128        { 
    125129                try 
    126130                { 
    127                         // Wait object with a timeout of 10 seconds, which is a reasonable time to wait before 
    128                         // cleaning up finished child processes. 
    129                         WaitForEvent connectionWait(10000); 
     131                        // Wait object with a timeout of 1 second, which 
     132                        // is a reasonable time to wait before cleaning up 
     133                        // finished child processes, and allows the daemon 
     134                        // to terminate reasonably quickly on request. 
     135                        WaitForEvent connectionWait(1000); 
    130136                         
    131137                        // BLOCK 
     
    219225                                } 
    220226                        } 
     227                         
     228                        NotifyListenerIsReady(); 
    221229         
    222230                        while(!StopRun())