Is it possible to change this value dynamically?
I want this value to be the same as the number of processors in the machine that the project is running.
Thanks.
Hi,
In Async Action Group there is a MaxThreads property.
The MaxThreads property can be changed dynamically with script.
FB also has a variable called NUMBER_OF_PROCESSORS, containing the number of processors of current machine.
Simply put one this line in Script Editor for a Async Group "BeforeAction":
- Python Script
Action.MaxThreads = int(FBVariables["NUMBER_OF_PROCESSORS"])
- Javascript
Action.MaxThreads = FBVariables.NUMBER_OF_PROCESSORS
- VBScript
Action.MaxThreads = NUMBER_OF_PROCESSORS
- PowerShell
$Action.MaxThreads = $FBVariables["NUMBER_OF_PROCESSORS"]
Hope this helps.