Represents a task which can be dispatched to a thread for execution.
The function implementing the task to be run.