TaskScheduler.QueueTask(Task) 方法
定义
protected public:
abstract void QueueTask(System::Threading::Tasks::Task ^ task);
[System.Security.SecurityCritical]
protected internal abstract void QueueTask (System.Threading.Tasks.Task task);
protected internal abstract void QueueTask (System.Threading.Tasks.Task task);
[<System.Security.SecurityCritical>]
abstract member QueueTask : System.Threading.Tasks.Task -> unit
abstract member QueueTask : System.Threading.Tasks.Task -> unit
Protected Friend MustOverride Sub QueueTask (task As Task)
参数
- 属性
例外
task 参数为 null。The task argument is null.
注解
派生自的类 TaskScheduler 实现此方法,以接受计划在计划程序上的任务。A class derived from TaskScheduler implements this method to accept tasks being scheduled on the scheduler.
典型的实现会将任务存储在内部数据结构中,这种情况下,可能会在将来某个时间执行这些任务的线程提供服务。A typical implementation would store the task in an internal data structure, which would be serviced by threads that would execute those tasks at some time in the future.
此方法仅由 .NET Framework 调用,不应由派生类直接调用。This method is only meant to be called by the .NET Framework and should not be called directly by the derived class. 这对于维护系统的一致性是必需的。This is necessary for maintaining the consistency of the system.