Ticket #1 (defect)
Opened 4 years ago
Last modified 4 years ago
Allow CP2 application shutdown
Status: closed (fixed)
| Reported by: | hmans | Assigned to: | rdelon |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0-final |
| Component: | CherryPy code | Keywords: | |
| Cc: |
We need to come up with a good way of cleanly shutting down a CP2 application. Right now, the only way to kill a CP2 app is to kill its process (Ctrl-C in Windows, kill in *nix, etc).
Change History
09/19/04 11:49:10: Modified by hmans
- status changed from new to assigned.
09/19/04 12:03:55: Modified by hmans
- owner deleted.
09/19/04 12:04:19: Modified by hmans
- owner set to hmans.
11/18/04 17:33:00: Modified by remco.boerma@gmail.com
but if all the threads were using some metaphore to see if they ought to quit at every page load for example, we only have to set that metaphore and request just as many pages as threads (or endlesly until the server finally stops).
Setting the metaphore can be done using xmlrpc or like global lock, or using some special header in the http request wich is accepted only from a few definable domains/ips..
Could this lead to a sollution?
11/30/04 16:59:29: Modified by rdelon
- owner changed from hmans to rdelon.
Investigate is os._exit() does the job after all threads have setDaemon=True
12/01/04 12:59:56: Modified by rdelon
- milestone changed from 2.0-beta to 2.0-final.
12/22/04 05:20:37: Modified by rdelon
- status changed from assigned to closed.
- resolution set to fixed.


In my past experiments in regards to this issue, I've mostly run across problems with the threads !BaseHTTPServer launches in CP2's threadpool mode.