The ManualWorkflowSchedulerService provides a threading service that enables the host application that creates a workflow instance to donate the Thread on which the workflow instance is run. Using this threading service, host applications can run a workflow instance on a single Thread (that is, in synchronous mode). This mode blocks the execution of the host application until the workflow instance becomes idle. Subsequently, the workflow instance can only be executed by using the RunWorkflow method of this service.
Alternatively, the workflow can be run on a thread created by a .NET timer by setting the useActiveTimers constructor parameter to true. When this timer expires, the workflow is executed on the timer's thread, rather than the host application's thread. This timer is implemented as a DelayActivity activity.
ManualWorkflowSchedulerService controls the number of threads spawned in an ASP.NET process by reusing the thread that made the ASP.NET Web request to run the workflow instance. This ensures that at any time, the number of active threads in the workflow runtime equals the number of active Web requests in the ASP.NET process.
ManualWorkflowSchedulerService does not automatically run a workflow instance that is in the queue. The host must call RunWorkflow to run a specified workflow.