非阻塞线程,在Windows

时间:2016-02-18 11:16:55

标签: c++ windows multithreading process

我有主线程尝试CreateProcess(),但主线程需要非阻塞我有点迷失如何在Linux上的窗口这样做我有点知道我的方式,但在Windows < / p>

int main () {
    while (1) {

     // do some stuff 
     CreateProcess();    

     // i want a way to handle these processes exit codes and away of signaling when 
     the process has returned, i am thinking of using
     WaitForSingleObject() with 0 timeout but i dont know how to go about it 
     any help will be appreciated, thank you.


    }


}

0 个答案:

没有答案