If I want to use completion port to get information from different thread ,
how can I design the structure of the program?How about the one below?
If I want to use a global function ,how can I set the mutexes ?
Main(){
for i in range NumOfThreads{
CreateIoCompletionPort()
CreatThread(ThreadFun)
}
}
ThreadFun(){
While(1){
GetQueuedCompletionStatus(); // wait for completion of an IO
Process What ever has completed ();
Start another file operation();
}
}