Click or drag to resize

GSF.Threading Namespace

Contains classes used to define managed threads that can be used for debugging threads by providing automatic tracking, total thread runtime and the ability to run threads in alternate execution contexts.
Classes
  Class Description
Public class ActionExtensions Defines extension methods for actions.
Public class CancellationToken Represents a token that can be used to cancel an asynchronous operation.
Public class CompatibleCancellationToken Represents a compatible implementation of the ICancellationToken interface that interoperates with the CancellationToken and can be used to cancel an asynchronous operation.
Public class DedicatedSynchronizedOperation A synchronized operation that uses its own dedicated thread.
Public class DelayedSynchronizedOperation Represents a short-running synchronized operation that cannot run while it is already in progress. Async operations will execute on the thread-pool after the specified Delay in milliseconds.
Public class EventTimer A reoccurring timer that fires on a given interval. This event timer will always fire at the top of the specified interval. If the callback takes too long, the next interval will be skipped.
Public class InterprocessLock Defines helper methods related to inter-process locking.
Public class InterprocessReaderWriterLock Represents an inter-process reader/writer lock using Semaphore and Mutex native locking mechanisms.
Public class LoadingAdjustedTimestamp This will provide the user with a timestamp based upon system loading. This timestamp will only move forward in time and may advance rapidly when trying to catch up with system time.
Public class LogicalThread Represents a thread of execution to which actions can be dispatched from other threads.
Public class LogicalThreadExtensions Defines extensions for the LogicalThread class.
Public class LogicalThreadLocalT Represents a slot in the thread local memory space of each logical thread.
Public class LogicalThreadOperation Synchronized operation that executes on a logical thread.
Public class LogicalThreadScheduler Manages synchronization of actions by dispatching actions to logical threads to be processed synchronously.
Public class LogicalThreadStatistics Represents a set of statistics gathered about the execution time of actions on a logical thread.
Public class LongSynchronizedOperation Represents a long-running synchronized operation that cannot run while it is already in progress.
Public class ManagedCancellationTokenSource Implements a reference counter for CancellationTokenSource to provide thread safety around Dispose.
Public class ManagedThread Defines a managed thread
Public class ManagedThreadPool Defines a managed thread pool
Public class ManagedThreads Maintains a reference to all managed threads
Public class MixedSynchronizedOperation Represents an operation that cannot run while it is already in progress.
Public class RateLimiter A rate limiting system based on tokes.
Public class ReaderWriterSpinLock Represents a fast, lightweight reader/writer lock that uses spinning to perform locking. No recursive acquires or upgradable locks are allowed (i.e., all entered locks must be exited before entering another lock).
Public class ScheduledTask Represents a way to schedule a task to be executed on a separate thread immediately or after a given time delay.
Public class SharedTimer Represents a timer class that will group registered timer event callbacks that operate on the same interval in order to optimize thread pool queuing.
Public class SharedTimerScheduler Represents a timer manager which is the scheduler of SharedTimer.
Public class ShortSynchronizedOperation Represents a short-running synchronized operation that cannot run while it is already in progress.
Public class ShutdownHandler This class will monitor the state to the application and raise events when it detects that the application is about to shutdown.
Public class SingleOccurrenceAction A helper class that will properly coordinate any number of Actions from different threads.
Public class StateMachine Helps facilitate a multithreaded state machine.
Public class SynchronizedOperationBase Base class for operations that cannot run while they is already in progress.
Public class TaskSynchronizedOperation Represents a task-based synchronized operation that cannot run while it is already in progress.
Public class WaitHandleExtensions Defines extension functions related to manipulation wait handle objects.
Public class WeakAction Provides a weak referenced Action delegate.
Public class WeakActionT Provides a weak referenced Action delegate.
Structures
  Structure Description
Public structure DisposableCallback A struct that executes a certain action upon disposing. The intended use for this is inside of a using block to assist in the proper release of a lock. Being a struct, it is unsafe make copies of this struct as Dispose may be called multiple times.
Public structure LogicalThreadExtensionsLogicalThreadAwaitable Provides an awaitable context for switching into a target environment.
Public structure LogicalThreadExtensionsLogicalThreadAwaitableLogicalThreadAwaiter Provides an awaiter that switches into a target environment.
Interfaces
  Interface Description
Public interface ICancellationToken Represents a token that can be used to cancel an asynchronous operation.
Public interface ISynchronizedOperation Represents an operation that cannot run while it is already in progress.
Enumerations
  Enumeration Description
Public enumeration AsynchronousExecutionMode Indicates modes of execution for the MixedSynchronizedOperation.
Public enumeration ScheduledTaskRunningReason Metadata about why this worker was called.
Public enumeration ShutdownHandlerOrder The order in which the specified callback should occur when shutting down.
Public enumeration SynchronizedOperationType Represents the available types of synchronized operations.
Public enumeration ThreadingMode Specifies the threading mode to use for the ScheduledTask
Public enumeration ThreadStatus Managed Thread States
Public enumeration ThreadType Managed Thread Types