프로퍼티 | 타입 | 설명 | |
---|---|---|---|
PostExecuteWorkItemCallback | void |
메소드 | 설명 | |
---|---|---|
AddTask ( Task task ) : void |
Adds a new task to the scheduler.
|
|
AddWorkGroup ( string name, int concurrencyLevel ) : IWorkGroup |
Adds a new work group.
|
|
AddWorkGroup ( string name, int concurrencyLevel, int maxQueueSize ) : IWorkGroup |
Adds a new work group.
|
|
RoomForNewWorkGroupTask ( IWorkGroup group ) : RoomForNewTaskResult |
If true, the task scheduler has room for the specified work group task
|
|
SmartThreadPoolTaskScheduler ( ITaskSchedulerConfiguration configuration, IWaitForEventOrCancelThreadPool waitForFreeThread, IMetrics metrics ) : System |
Initializes a new instance of the SmartThreadPoolTaskScheduler class.
|
|
Start ( ) : void |
Starts this instance.
|
|
Subscribe ( ) : int |
Informs the scheduler that it has another client connected
|
|
UnSubscribe ( int id ) : void |
Informs the scheduler that a client has disconnected
|
메소드 | 설명 | |
---|---|---|
DeincrementCounter ( ) : void |
De-increments the counter for the running tasks
|
|
DeincrementGroup ( IWorkGroup group ) : void |
De-increments the task counter for a specific group.
|
|
Dispose ( bool disposing ) : void |
Releases unmanaged and - optionally - managed resources.
|
|
GetScheduledTasks ( ) : IEnumerable |
Gets the tasks currently scheduled to this scheduler. This will always return an empty enumerable, as tasks are launched as soon as they're queued; we also don't want the .net scheduler to mess with our internal queue. |
|
HaveRoomForWorkGroupTask ( IWorkGroup group ) : bool |
Returns true if the work group has room for a new task
|
|
IncrementCounter ( ) : void |
Increments the counter for the running tasks
|
|
IncrementGroup ( IWorkGroup group ) : void |
Increments the task count for a specific group
|
|
QueueTask ( Task task ) : void |
Queues a T:System.Threading.Tasks.Task to the scheduler.
|
|
SetWaitHandle ( IWorkGroup group ) : void |
Sets the wait handle.
|
|
ThrowIfDisposed ( [ name = "" ) : void |
Throws an exception if this instance has been disposed.
|
|
TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool |
Runs the provided task on the current thread.
|
|
TryExecuteTaskWrapped ( Task task, |
A wrapper for executing the task, so that we can return the state information back to the caller
|
메소드 | 설명 | |
---|---|---|
PostExecuteWorkItemCallback ( IWorkItemResult wir ) : void |
Fires after each task is complete.
|
public AddWorkGroup ( string name, int concurrencyLevel ) : IWorkGroup | ||
name | string | The name. |
concurrencyLevel | int | The concurrency level. |
리턴 | IWorkGroup |
public AddWorkGroup ( string name, int concurrencyLevel, int maxQueueSize ) : IWorkGroup | ||
name | string | The name. |
concurrencyLevel | int | The concurrency level. |
maxQueueSize | int | Maximum size of the queue. Work groups have a queue that is separate per queue, and is not shared with non work group items |
리턴 | IWorkGroup |
protected DeincrementGroup ( IWorkGroup group ) : void | ||
group | IWorkGroup | The group. |
리턴 | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
리턴 | void |
protected HaveRoomForWorkGroupTask ( IWorkGroup group ) : bool | ||
group | IWorkGroup | The group. |
리턴 | bool |
protected IncrementGroup ( IWorkGroup group ) : void | ||
group | IWorkGroup | The group. |
리턴 | void |
protected final QueueTask ( Task task ) : void | ||
task | Task | The |
리턴 | void |
public RoomForNewWorkGroupTask ( IWorkGroup group ) : RoomForNewTaskResult | ||
group | IWorkGroup | The group. |
리턴 | RoomForNewTaskResult |
protected SetWaitHandle ( IWorkGroup group ) : void | ||
group | IWorkGroup | The group. |
리턴 | void |
public SmartThreadPoolTaskScheduler ( ITaskSchedulerConfiguration configuration, IWaitForEventOrCancelThreadPool waitForFreeThread, IMetrics metrics ) : System | ||
configuration | ITaskSchedulerConfiguration | The configuration. |
waitForFreeThread | IWaitForEventOrCancelThreadPool | The wait for free thread. |
metrics | IMetrics | the metrics factory |
리턴 | System |
protected TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool | ||
task | Task | The task to be executed. |
taskWasPreviouslyQueued | bool | Ignored. |
리턴 | bool |
protected TryExecuteTaskWrapped ( Task task, |
||
task | Task | The task. |
state | The state. | |
리턴 |