CogVisionToolMultiThreading SetModeCountAndEnable Method Cognex VisionPro 9.8 SR1
Set the thread count mode, thread count and multi-threading enable state when running vision tools.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 75.0.0.0
Syntax

public static void SetModeCountAndEnable(
	CogVisionToolMultiThreadingThreadCountModeConstants threadCountMode,
	int threadCount,
	bool enable
)

Parameters

threadCountMode
Type: Cognex.VisionPro CogVisionToolMultiThreadingThreadCountModeConstants
the thread count mode of the vision tool multithreading mechanism.
threadCount
Type: System Int32
the thread count of the vision tool multithreading mechanism uses when running multithreading aware vision tools.
enable
Type: System Boolean
The current state of the vision tool multithreading mechanism.
Remarks

If multi-threading is enabled and the thread count mode is HardwareDefined, then the thread count will be set to the number of physical processors or cores installed. If any exception is thrown, the last good values of thread count mode, thread count, and multi-threading enable state will be restored.
See Also