TaskScheduler.TryDequeue(Task) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Tente de mettre en file d’attente un Task fichier précédemment mis en file d’attente vers ce planificateur.
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
Paramètres
Retours
Valeur booléenne indiquant si l’argument task a été correctement mis en file d’attente.
- Attributs
Exceptions
L’argument task est null.
Remarques
Pour plus d’informations, consultez TaskScheduler.
Cette méthode peut s’exécuter dans un bloc final ; il doit donc retourner le plus rapidement possible afin que toutes les ressources telles que CancellationTokenRegistration les objets puissent être supprimées en temps voulu.