We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
例子: 这样线程将不会被执行。 call_thunk::thunk thunk<cb_type>(obj, &TestClass::fun); CreateThread ( NULL , 0 , (LPTHREAD_START_ROUTINE )thunk, NULL , 0 , NULL ); return;
这样线程才会成功执行 call_thunk::thunk thunk<cb_type>(obj, &TestClass::fun); CreateThread ( NULL , 0 , (LPTHREAD_START_ROUTINE )thunk, NULL , 0 , NULL ); Sleep(100); return;
The text was updated successfully, but these errors were encountered:
call_thunk::thunk thunk<cb_type>(obj, &TestClass::fun); 改为全局变量。 临时变量去到线程中就不可用了,注意线程安全。
Sorry, something went wrong.
No branches or pull requests
例子:
这样线程将不会被执行。
call_thunk::thunk thunk<cb_type>(obj, &TestClass::fun);
CreateThread ( NULL , 0 , (LPTHREAD_START_ROUTINE )thunk, NULL , 0 , NULL );
return;
这样线程才会成功执行
call_thunk::thunk thunk<cb_type>(obj, &TestClass::fun);
CreateThread ( NULL , 0 , (LPTHREAD_START_ROUTINE )thunk, NULL , 0 , NULL );
Sleep(100);
return;
The text was updated successfully, but these errors were encountered: