class IWorker(Interface): (source)
A worker that can perform some work concurrently.
All methods on this interface must be thread-safe.
|Perform the given task.
|Free any resources associated with this
IWorker and cause it to reject all future work.
Perform the given task.
As an interface, this method makes no specific claims about concurrent execution. An
IWorker's do implementation may defer execution for later on the same thread, immediately on a different thread, or some combination of the two. It is valid for a do method to schedule task in such a way that it may never be executed.
It is important for some implementations to provide specific properties with respect to where task is executed, of course, and client code may rely on a more specific implementation of do than
|a task to call in a thread or other concurrent context.
|if quit has been called.