Click or drag to resize
DigitalRuneSimulationSettingsEnableMultithreading Property
Gets or sets a value indicating whether multithreading is enabled.

Namespace: DigitalRune.Physics.Settings
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.10.0.0 (1.10.0.14427)
Syntax
public bool EnableMultithreading { get; set; }

Property Value

Type: Boolean
if multithreading is enabled; otherwise, . The default value is if the current system has more than one CPU cores.
Remarks

When multithreading is enabled the simulation will distribute the workload across multiple processors (CPU cores) to improve the performance.

Multithreading adds an additional overhead, therefore it should only be enabled if the current system has more than one CPU core and if the other cores are not fully utilized by the application. Multithreading should be disabled if the system has only one CPU core or if all other CPU cores are busy. In some cases it might be necessary to run a benchmark of the application and compare the performance with and without multithreading to decide whether multithreading should be enabled or not.

The simulation internally uses the class Parallel for parallelization. Parallel is a static class that defines how many worker threads are created, how the workload is distributed among the worker threads and more. (See Parallel to find out more on how to configure parallelization.)

See Also