Comment 9 for bug 1184376

Revision history for this message
Barry Warsaw (barry) wrote :

This turned out to be a more extensive branch than anticipated because of weirdness in three competing constraints. To properly shutdown the WSGI server, the .shutdown() method must be called in a separate thread from the server. But because of SQLite constraints, the server must run in the main thread, and because of Python signal handling semantics, the signal handlers must run in the main thread. I solved this, by running a subthread that just waits on an Event and then calls the .shutdown(). The signal handler fires the Event.

I also greatly simplified the bin/runner implementation and removed some command line options that weren't really being used.

Thanks for the test code! I did a little bit of refactoring, but it was very helpful.