网站首页  词典首页

请输入您要查询的函数:

 

术语 callbackmayrunlong
释义 CallbackMayRunLong
语法:
C++
BOOL WINAPI CallbackMayRunLong(
__inout PTP_CALLBACK_INSTANCE pci
);
CallbackMayRunLong功能
表明,回调可能不会很快返回。
参数
的PCI [中,输出]
阿TP_CALLBACK_INSTANCE结构,它定义的回调实例。结构传递给回调函数。
返回值
该函数返回TRUE,如果另一个线程池线程在处理回调或线程池的可用能旋转一个新线程。在这种情况下,目前的回调函数可以使用当前线程下去。
该函数返回FALSE,如果另一个线程池线程没有可用于处理回调或线程池无法转动一个新线程。线程池将尝试旋转延迟后一个新的线程,但如果目前的回调函数运行长,线程池可能会失去效率。
备注
线程池可以使用这些信息来更好地确定一个新的线程时,应建立。
该CallbackMayRunLong职能应该只调用的线程处理回调。从另一个线程调用这个函数可能会导致竞争条件。
该CallbackMayRunLong函数总是标志着只要回调运行,无论一个线程处理回调或ThreadPool中提供能够分配一个新的线程。因此,这一职能应当只调用一次,即使它返回FALSE。
要编译的应用程序使用此函数,定义为0x0600或更高_WIN32_WINNT。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
DisassociateCurrentThreadFromCallback
FreeLibraryWhenCallbackReturns
LeaveCriticalSectionWhenCallbackReturns
ReleaseMutexWhenCallbackReturns
ReleaseSemaphoreWhenCallbackReturns
SetEventWhenCallbackReturns
SetThreadpoolCallbackRunsLong
线程池
TrySubmitThreadpoolCallback
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==CallbackMayRunLong Function
Indicates that the callback may not return quickly.
Syntax
C++
BOOL WINAPI CallbackMayRunLong(
__inout PTP_CALLBACK_INSTANCE pci
);
Parameters
pci [in, out]
A TP_CALLBACK_INSTANCE structure that defines the callback instance. The structure is passed to the callback function.
Return Value
The function returns TRUE if another thread in the thread pool is available for processing callbacks or the thread pool was able to spin up a new thread. In this case, the current callback function may use the current thread indefinitely.
The function returns FALSE if another thread in the thread pool is not available to process callbacks or the thread pool was not able to spin up a new thread. The thread pool will attempt to spin up a new thread after a delay, but if the current callback function runs long, the thread pool may lose efficiency.
Remarks
The thread pool may use this information to better determine when a new thread should be created.
The CallbackMayRunLong function should be called only by the thread that is processing the callback. Calling this function from another thread may cause a race condition.
The CallbackMayRunLong function always marks the callback as long-running, whether or not a thread is available for processing callbacks or the threadpool is able to allocate a new thread. Therefore, this function should be called only once, even if it returns FALSE.
To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or higher.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
DisassociateCurrentThreadFromCallback
FreeLibraryWhenCallbackReturns
LeaveCriticalSectionWhenCallbackReturns
ReleaseMutexWhenCallbackReturns
ReleaseSemaphoreWhenCallbackReturns
SetEventWhenCallbackReturns
SetThreadpoolCallbackRunsLong
Thread Pools
TrySubmitThreadpoolCallback
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms681981(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 更新时间:2025/1/8 10:43:03