mozilla-services/circus — pull request #543 by thefab (2013-09-18 13:38:49+00:00)
Title: (DO NOT MERGE) Async experiment on #540 and #537

It's not ready but:
- unit tests are ok
- stop/restart/set/quit commands are asynchronous in circusd
- stop/restart/set/quit commands have a switch "waiting" (default False) in circusctl to simulate a blocking behavior

For example:

circusctl --timeout 300 quit --waiting

blocks until the complete end of the stop process (graceful stop of watchers...). But of course, the event loop of circusd is not blocked and another console can do some `circusctl status` for example to monitor the shutdown process.

There is still a lot of work missing:
- some flags are missing for locking some commands during asynchronous execution
- we have to refactor a bit watcher.py to cleanly merge the fix for #537
...

But comments and ideas are welcome before. Thanks.