IDTSDataPump2::SetExecuteThreadComplete

DTS Programming

DTS Programming

IDTSDataPump2::SetExecuteThreadComplete

The SetExecuteThreadComplete method completes processing that must be done on the current thread, prior to the data pump being called on another thread.

Syntax

HRESULT SetExecuteThreadComplete( );

Remarks

Some transformations may generate a thread-specific state that requires cleanup to be executed on that thread. For example, if ExecuteInit or ExecuteRow is called on a worker thread that is not the same as that on which ExecuteComplete is called, SetExecuteThreadComplete must be called on the worker thread when it has completed its operation (prior to ExecuteComplete being called).

Currently this is specific to the Microsoft® ActiveX® Script transformation, due to the requirement that IActiveScript execution state cannot be transferred across threads. In ActiveX Script transformations, any variables in the script, including global variables outside function scope, will be independent across multiple threads calling ExecuteRow. Calling this method causes IDTSDataPumpTransform2::SetExecuteThreadComplete to be called for all transformations supporting the IDTSDataPumpTransform2 interface.

See Also

IDTSDataPump2::ExecuteComplete

IDTSDataPump2::ExecuteInit

IDTSDataPump2::ExecuteRow