daemon shutdown stuff



Just checked in some changes to add clean shutdown to the daemon.
beagle/tools/beagle-shutdown can be run to shutdown the daemon.

Some changes that are relevant to people writing code:

* Worker threads should call Shutdown.WorkerStart() and
Shutdown.WorkerFinished(), or be marked as Background threads.  The
daemon will wait for all WorkerStart'ed threads to exit

* When a shutdown is requested, Shutdown.ShutdownEvent will be fired,
and Shutdown.ShutdownRequested should be set to true.  Code should use
one of these to shut down workers quickly

* If you're using the ThreadedPriorityQueue object, the following code
will manage the WorkerStart/Shutdown for you:
   ThreadedPriorityQueue queue = new ThreadedPriorityQueue ();
   Shutdown.AddQueue (queue);
   queue.Start ();






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]