Namespace NanoByte.Common.Threading
Helpers for working with threads.
Classes
- ActionExtensions
Provides extension methods for Action<T>
- AsyncFormWrapper<T>
Lazily starts a separate thread with a message loop for a Form.
- CancellationGuard
Ensures that a block of code running on a background thread cleanly exits before a Cancel() call completes.
- FuncExtensions
Provides extension methods for Func<T, TResult>
- JobQueue
Runs jobs on a single background thread that is started and stopped on demand.
- MarshalNoTimeout
Derive from this class to enable remoting without timeouts. Keeps remoting object alive as long as process is running.
- MutexLock
Provides a wrapper around Mutex that automatically acquires on creating and releases on Dispose().
- ResultRacer
Helper for racing multiple operations against each other, providing the result of the first one that finishes.
- ResultRacer<T>
Helper for racing multiple operations against each other, providing the result of the first one that finishes.
- SynchronousProgress<T>
Reports progress updates using callbacks/events. Performs the callbacks immediately on the same thread.
- ThreadUtils
Provides helper methods for launching Threads.
- WaitHandleExtensions
Provides extension methods for WaitHandle.
- WaitTask
Waits for a WaitHandle to become available or the CancellationToken to be triggered.