网站首页  词典首页

请输入您要查询的函数:

 

术语 switchtofiber
释义 SwitchToFiber
语法:
C++
VOID WINAPI SwitchToFiber(
__in LPVOID lpFiber
);
SwitchToFiber功能
附表一纤维。该函数必须要求光纤。
参数
lpFiber [in]
纤维的地址安排。
返回值
这个函数没有返回值。
备注
您创建与CreateFiber功能纤维。在您可以安排与线程相关的纤维,必须调用ConvertThreadToFiber成立一个领域,光纤保存状态信息。 The thread is now the currently executing fiber.
该SwitchToFiber功能保存当前的纤维和恢复指定的纤维状态的状态信息。您可以调用由不同的线程创建了一个光纤地址SwitchToFiber。要做到这一点,您必须拥有处理返回时,其他线程调用CreateFiber,您必须使用正确的同步。
避免以下调用:
SwitchToFiber(GetCurrentFiber());
此调用可能会导致不可预知的问题。
要编译的应用程序使用此功能,定义_WIN32_WINNT为0x0400或更高版本。有关详细信息,请参阅使用Windows头。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CreateFiber
ConvertThreadToFiber
纤维
进程和线程函数
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==SwitchToFiber Function
Schedules a fiber. The function must be called on a fiber.
Syntax
C++
VOID WINAPI SwitchToFiber(
__in LPVOID lpFiber
);
Parameters
lpFiber [in]
The address of the fiber to be scheduled.
Return Value
This function does not return a value.
Remarks
You create fibers with the CreateFiber function. Before you can schedule fibers associated with a thread, you must call ConvertThreadToFiber to set up an area in which to save the fiber state information. The thread is now the currently executing fiber.
The SwitchToFiber function saves the state information of the current fiber and restores the state of the specified fiber. You can call SwitchToFiber with the address of a fiber created by a different thread. To do this, you must have the address returned to the other thread when it called CreateFiber and you must use proper synchronization.
Avoid making the following call:
SwitchToFiber( GetCurrentFiber() );
This call can cause unpredictable problems.
To compile an application that uses this function, define _WIN32_WINNT as 0x0400 or later. For more information, see Using the Windows Headers .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CreateFiber
ConvertThreadToFiber
Fibers
Process and Thread Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms686350(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 13:15:49