Initializes a new instance of the
DefaultWorkflowSchedulerService class by using the specified maximum number of workflow instances that the service can run simultaneously.
Namespace: System.Workflow.Runtime.Hosting
Assembly: System.Workflow.Runtime (in system.workflow.runtime.dll)

Syntax
Visual Basic (Declaration)
Public Sub New ( _
maxSimultaneousWorkflows As Integer _
)
Dim maxSimultaneousWorkflows As Integer
Dim instance As New DefaultWorkflowSchedulerService(maxSimultaneousWorkflows)
public DefaultWorkflowSchedulerService (
int maxSimultaneousWorkflows
)
public:
DefaultWorkflowSchedulerService (
int maxSimultaneousWorkflows
)
public DefaultWorkflowSchedulerService (
int maxSimultaneousWorkflows
)
public function DefaultWorkflowSchedulerService (
maxSimultaneousWorkflows : int
)
Parameters
- maxSimultaneousWorkflows
An integer that determines the maximum number of workflow instances that can be stored in the thread pool queue.

Exceptions

Remarks
Setting maxSimultaneousWorkflows to a high value may cause the .NET thread pool to starve. This could cause timeouts when a persistence service tries to complete a persistence transaction because Transaction objects also use the .NET thread pool.
If not specified in a constructor or configuration file, the default value for maxSimultaneousWorkflows is 5 for a single-processor machine, and (int)(5 * Environment.ProcessorCount * .8) for a multiple-processor machine. Note that (int)(5 * Environment.ProcessorCount * .8) isn't always the same as (int)(4 * Environment.ProcessorCount), because of the rules of integer arithmetic.

Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information
.NET Framework
Supported in: 3.0

See Also