TaskScheduler.TryDequeue(Task) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to dequeue a Task that was previously queued to this scheduler.
protected public:
virtual bool TryDequeue(System::Threading::Tasks::Task ^ task);
[System.Security.SecurityCritical]
protected internal virtual bool TryDequeue (System.Threading.Tasks.Task task);
protected internal virtual bool TryDequeue (System.Threading.Tasks.Task task);
[<System.Security.SecurityCritical>]
abstract member TryDequeue : System.Threading.Tasks.Task -> bool
override this.TryDequeue : System.Threading.Tasks.Task -> bool
abstract member TryDequeue : System.Threading.Tasks.Task -> bool
override this.TryDequeue : System.Threading.Tasks.Task -> bool
Protected Friend Overridable Function TryDequeue (task As Task) As Boolean
Parameters
Returns
A Boolean denoting whether the task
argument was successfully dequeued.
- Attributes
Exceptions
The task
argument is null.
Remarks
For more information, see TaskScheduler.
This method may execute in a finally block; therefore it should return as quickly as possible so that any resources such as CancellationTokenRegistration objects can be disposed of in a timely manner.
Applies to
See also
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za