Gets or sets whether a service supports one thread, multiple threads, or reentrant calls.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
This property indicates whether an instance of a callback object supports one thread or multiple threads that execute concurrently, and if single-threaded, whether reentrancy is supported.
Setting ConcurrencyMode to Single instructs the system to restrict instances of the service to one thread of execution at a time, which frees you from dealing with threading issues. This is the default value. A value of Multiple means that service objects can be executed by multiple threads at any one time. In this case, you must ensure thread safety and state consistency.
Reentrantalso restricts access to a single thread at a time. However, it enables calls out from an executing service method to return and reenter the executing service. A reentrant call can execute on a different managed thread, but in this case the original thread is blocked for the duration of the reentrant call.
Generally, if a message arrives for an instance that violates its concurrency mode, the message waits until the instance is available, or until it times out.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.