A DaemonService provides a background service which is suitable for asynchronous I/O and general clean up. It should not be used as a general worker thread for parallel execution. A DaemonService can be subscribe to by many Serviceable objects and a DaemonService will call that object's performWork from time to time. The performWork method is defined by the client object and should be well behaved - in other words, it should not take too long or hog too many resources or deadlock with anyone else. And it cannot (should not) error out.
It is up to each DaemonService
implementation to define its level of service, including
- how quickly and how often the clients should expect to be be serviced
- how the clients are prioritized
- whether the clients need to tolerate spurious services
MT - all routines on the interface must be MT-safe.
@see Serviceable