Hi,
Does anyone know what these "FIBER" things are? They come with newer windows.
The "main" is not even executed onse SwitchToFiber call.Code:#include "stdafx.h" #include <windows.h> #include <iostream> using namespace std; HANDLE hSemaphore; void ThreadProc(){ for(int i = 0; i < 10; i++) cout << "Fiber : " << i << endl; } void main(){ ::ConvertThreadToFiber(NULL); LPVOID fi = CreateFiber(0, (LPFIBER_START_ROUTINE)ThreadProc, NULL); ::SwitchToFiber(fi); ::DeleteFiber(fi); for(int i = 0; i < 10; i++) cout << "Main : " << i << endl; }




Reply With Quote