• Michael Hanselmann's avatar
    ganeti.daemon: Make Mainloop more flexible · b14b975f
    Michael Hanselmann authored
    While working on the HTTP client class, I wanted to use Mainloop
    before deciding to use threads instead.
    
    - Add docstrings
    - Rename "quit" to "running", move it to a local variable
    - Support adding and removing I/O listeners while running
      (e.g. to add/remove listeners from OnIO(…) calls)
    - Allow user of the class to disable signal handlers
    - Flag to exit once all listeners are gone
    
    Reviewed-by: iustinp
    b14b975f
daemon.py 5.24 KB