网站首页  词典首页

请输入您要查询的函数:

 

术语 setthreadpoolwait
释义 SetThreadpoolWait
语法:
C++
VOID WINAPI SetThreadpoolWait(
__inout PTP_WAIT pwa,
__in_opt HANDLE h,
__in_opt PFILETIME pftTimeout
);
SetThreadpoolWait功能
设置等待的对象。一名工人线程调用处理后变为信号或以后在指定的超时过期等待对象的回调函数。
参数
PWA中[ in , out ]
阿TP_WAIT结构,它定义等待的对象。该CreateThreadpoolWait函数返回这个结构。
? [中,可选]
句柄。
如果该参数为NULL,等待的对象将不再排队新的回调(回调已经排队,但依然会发生)。
pftTimeout [中,可选]
绝对或相对时间的操作应该等待时间。如果此参数是积极的,它指出了自1600年1月1日的绝对时间,在100纳秒的时间间隔。如果此参数是负的,它表明了等待时间的数量相对于当前的时间。如果此参数为0,等待时间立即进行。如果该参数是NULL,等待不会超时。
返回值
这个函数没有返回值。
备注
您必须重新登记前,它每次信号触发等待回调与等待对象的事件。
要编译的应用程序使用此函数,定义为0x0600或更高_WIN32_WINNT。
实例
有关示例,请参阅使用线程池功能。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CloseThreadpoolWait
CreateThreadpoolWait
线程池
WaitForThreadpoolWaitCallbacks
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==SetThreadpoolWait Function
Sets the wait object. A worker thread calls the wait object's callback function after the handle becomes signaled or after the specified timeout expires.
Syntax
C++
VOID WINAPI SetThreadpoolWait(
__inout PTP_WAIT pwa,
__in_opt HANDLE h,
__in_opt PFILETIME pftTimeout
);
Parameters
pwa [in, out]
A TP_WAIT structure that defines the wait object. The CreateThreadpoolWait function returns this structure.
h [in, optional]
A handle.
If this parameter is NULL, the wait object will cease to queue new callbacks (but callbacks already queued will still occur).
pftTimeout [in, optional]
The absolute or relative time at which the wait operation should time out. If this parameter is positive, it indicates the absolute time since 1/1/1600, in 100-nanosecond intervals. If this parameter is negative, it indicates the amount of time to wait relative to the current time. If this parameter is 0, the wait times out immediately. If this parameter is NULL, the wait will not time out.
Return Value
This function does not return a value.
Remarks
You must re-register the event with the wait object before signaling it each time to trigger the wait callback.
To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or higher.
Examples
For an example, see Using the Thread Pool Functions .
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CloseThreadpoolWait
CreateThreadpoolWait
Thread Pools
WaitForThreadpoolWaitCallbacks
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms686273(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:22:49