AsyncManualResetEvent(Boolean, Boolean) Constructeur
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.
Initialise une nouvelle instance de la classe AsyncManualResetEvent.
AsyncManualResetEvent(bool initialState = false, bool allowInliningAwaiters = false);
public AsyncManualResetEvent(bool initialState = false, bool allowInliningAwaiters = false);
new Microsoft.VisualStudio.Threading.AsyncManualResetEvent : bool * bool -> Microsoft.VisualStudio.Threading.AsyncManualResetEvent
Public Sub New (Optional initialState As Boolean = false, Optional allowInliningAwaiters As Boolean = false)
Paramètres
- initialState
- Boolean
Valeur indiquant si l’événement doit être signalé initialement.
- allowInliningAwaiters
- Boolean
Valeur indiquant s'il faut autoriser WaitAsync() les continuations des appelants à s'exécuter sur le thread qui appelle Microsoft.VisualStudio.Threading.AsyncManualResetEvent.SetAsync avant le retour de l'appel.
Microsoft.VisualStudio.Threading.AsyncManualResetEvent.SetAsync les appelants ne doivent pas contenir de verrous privés si cette valeur consiste true à éviter les interblocages.
Quandfalse, la tâche retournée peut ne pas avoir entièrement migré vers son état terminé au moment Microsoft.VisualStudio.Threading.AsyncManualResetEvent.SetAsync où elle est retournée WaitAsync() à son appelant.
Remarques
false mieux simule le comportement de laManualResetEventSlim classe, mais true peut entraîner des performances légèrement meilleures.