Runs the specified delegate in a task.
application main delegate to run in a task
exit code to return to the OS
See Implementation
Runs the specified delegate in a task.