Edit

Share via


Activity.BindToCurrentThread Method

Definition

Binds the user-defined work to the current thread.

C#
public void BindToCurrentThread();

Remarks

BindToCurrentThread binds the batch work that is submitted by the SynchronousCall or AsynchronousCall methods to the current single-threaded apartment (STA). BindToCurrentThread has no effect if the current thread is being run in the multithreaded apartment (MTA). The current thread model is determined by the configuration of the ThreadPool property of the ServiceConfig object.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1