Click or drag to resize

ThreadingPolicy Class

Specifies how a parallelizable operation should utilize multithreading. By default, the threading policy specifies that parallelizable operations should utilize one thread per logical processor on the system, and that the threads should be recruited from the ThreadPool.
Inheritance Hierarchy
SystemObject
  AGI.Foundation.Infrastructure.ThreadingThreadingPolicy

Namespace:  AGI.Foundation.Infrastructure.Threading
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public static class ThreadingPolicy

The ThreadingPolicy type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberNumberOfThreads
Gets or sets the number of threads to use to execute parallelizable operations.
Public propertyStatic memberThreadSource
Gets or sets the source of new threads to be used to execute parallelizable operations.
Top
Methods
  NameDescription
Public methodStatic memberConfigureToUseAllLogicalProcessors
Configures the threading policy so that parallelizable operations use one thread for each logical processor on the system. In some partial-trust environments, in may not be possible to determine the number of logical processors. In that case, the threading policy will be configured to use two threads.
Public methodStatic memberConfigureToUseCurrentThreadOnly
Configures the threading policy so that parallelizable operations are executed using only the thread that invoked them. No additional threads are created.
Public methodStatic memberResetCurrentToDefault
Resets the current threading policy to the default.
Public methodStatic memberUseCurrentAsDefault
Sets the current threading policy as the default policy to be used for new threads.
Top
See Also