Class PhysicalScheduler
Physical scheduler managing pool of workers.
Inheritance
Namespace: Reaqtive.Scheduler
Assembly: Reaqtive.Scheduler.dll
Syntax
public sealed class PhysicalScheduler : Object, IDisposable, ISchedulerExceptionHandler
Properties
TraceSource
Gets or sets the trace source used to log scheduler events.
Declaration
public TraceSource TraceSource { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Diagnostics.TraceSource |
Methods
CheckAccess()
Determines whether the calling thread is one the threads associated with this scheduler.
Declaration
public bool CheckAccess()
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Create()
Creates an instance of the scheduler.
Declaration
public static PhysicalScheduler Create()
Returns
| Type | Description |
|---|---|
| PhysicalScheduler | A scheduler. |
Create(Int32, ThreadPriority)
Creates a physical scheduler with the specified number of workers.
Declaration
public static PhysicalScheduler Create(int numberOfWorkers, ThreadPriority priority)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | numberOfWorkers | The number of workers. |
| System.Threading.ThreadPriority | priority | The thread priority for the worker threads. |
Returns
| Type | Description |
|---|---|
| PhysicalScheduler | A scheduler. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
VerifyAccess()
Determines whether the calling thread has access to the scheduler.
Declaration
public void VerifyAccess()
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | The calling thread does not have access to this scheduler. |
Events
UnhandledException
Event to observe unhandled exceptions and optionally mark them as handled.
Declaration
public event EventHandler<SchedulerUnhandledExceptionEventArgs> UnhandledException
Event Type
| Type | Description |
|---|---|
| System.EventHandler<SchedulerUnhandledExceptionEventArgs> |
Explicit Interface Implementations
ISchedulerExceptionHandler.TryCatch(Exception, IWorkItem)
Tries to handle an exception that was thrown by a work item running on the scheduler.
Declaration
bool ISchedulerExceptionHandler.TryCatch(Exception error, IWorkItem task)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Exception | error | Exception to handle. |
| IWorkItem | task | Task that threw the exception. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|