SetThreadpoolCallbackPriority, fonction (winbase.h)

Spécifie la priorité d’une fonction de rappel par rapport à d’autres éléments de travail dans le même pool de threads.

Syntaxe

void SetThreadpoolCallbackPriority(
  [in, out] PTP_CALLBACK_ENVIRON pcbe,
  [in]      TP_CALLBACK_PRIORITY Priority
);

Paramètres

[in, out] pcbe

Structure TP_CALLBACK_ENVIRON qui définit l’environnement de rappel. La fonction InitializeThreadpoolEnvironment retourne cette structure.

[in] Priority

Priorité du rappel par rapport aux autres rappels dans le même pool de threads. Ce paramètre peut être l’une des valeurs d’énumération TP_CALLBACK_PRIORITY suivantes :

Valeur Signification
TP_CALLBACK_PRIORITY_HIGH
Le rappel doit s’exécuter à priorité élevée.
TP_CALLBACK_PRIORITY_LOW
Le rappel doit s’exécuter à faible priorité.
TP_CALLBACK_PRIORITY_NORMAL
Le rappel doit s’exécuter à priorité normale.

Valeur de retour

None

Remarques

Les rappels de priorité plus élevée sont assurés d’être exécutés en premier par le premier thread de travail disponible, mais il n’est pas garanti qu’ils se terminent avant les rappels de priorité inférieure.

Cette fonction est implémentée en tant que fonction inline.

Pour compiler une application qui utilise cette fonction, définissez _WIN32_WINNT >= _WIN32_WINNT_WIN7. Pour plus d’informations, consultez Utilisation des en-têtes Windows.

Configuration requise

   
Client minimal pris en charge Windows 7 [applications de bureau | Applications UWP]
Serveur minimal pris en charge Windows Server 2008 R2 [applications de bureau | Applications UWP]
Plateforme cible Windows
En-tête winbase.h (inclure Windows.h)