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
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru