EN
此内容没有您的语言版本,但有英语版本。

TpSetCallbackPriority function

Specifies the priority of a callback function relative to other work items in the same thread pool.

Syntax


VOID FORCEINLINE TpSetCallbackPriority(
  _Inout_ PTP_CALLBACK_ENVIRON CallbackEnviron,
  _In_    TP_CALLBACK_PRIORITY Priority
);

Parameters

CallbackEnviron [in, out]

A TP_CALLBACK_ENVIRON structure that defines the callback environment. The TpInitializeCallbackEnviron function returns this structure.

Priority [in]

The priority for the callback relative to other callbacks in the same thread pool. This parameter can be one of the following TP_CALLBACK_PRIORITY enumeration values:

ValueMeaning
TP_CALLBACK_PRIORITY_HIGH

The callback should run at high priority.

TP_CALLBACK_PRIORITY_LOW

The callback should run at low priority.

TP_CALLBACK_PRIORITY_NORMAL

The callback should run at normal priority.

 

Return value

This function does not return a value.

Remarks

Higher priority callbacks are guaranteed to be run first by the first available worker thread, but they are not guaranteed to finish before lower priority callbacks.

This function is implemented as an inline function.

Requirements

Header

Winnt.h

See also

TpInitializeCallbackEnviron
TpDestroyCallbackEnviron
TpSetCallbackActivationContext
TpSetCallbackCleanupGroup
TpSetCallbackFinalizationCallback
TpSetCallbackLongFunction
TpSetCallbackNoActivationContext
TpSetCallbackPersistent
TpSetCallbackRaceWithDll
TpSetCallbackThreadpool

 

 

社区附加资源

添加
显示:
© 2015 Microsoft