EnableMultiThreading

<< Click to Display Table of Contents >>

Navigation:  Management >

EnableMultiThreading

Previous pageReturn to chapter overviewNext page

[Professional Edition or higher]

By default, VPE is not thread-safe. If you are using VPE in a multi-threaded environment, set the property EnableMultiThreading = True, to activate the thread-safe code of VPE.

On some platforms it might be required to purchase and install a special server license (for each server), before this property can be used.

property boolean VPE.EnableMultiThreading

write; runtime

Possible Values:

Value

Description

True

VPE's thread-safe code is activated

False

VPE's thread-safe code is not active

Default:

False

Remarks:

VPE documents must be created and used separately per thread, i.e. each thread must create a VPE document itself by calling OpenDoc(), and one thread must not use the document handle of another thread for calls to the VPE API.

 

VPE will operate slower, if the thread-safe code is activated, due to acquiring and releasing thread-locks.

 

Once the thread-safe code has been activated, it is activated for all VPE documents that are currently open - and that will be opened later - by the calling application instance. Furthermore the thread-safe code can not be deactivated by the application instance.

 

The trial versions of VPE allow to activate the thread-safe code for testing purposes.

 

The following does not apply to the .NET and ActiveX components, since both perform the licensing internally:

If you activated multi-threading and call later the License() method, the licensing will fail. You must call the License() method before you activate the thread-safe code.