本文整理汇总了C++中Thread::Main方法的典型用法代码示例。如果您正苦于以下问题:C++ Thread::Main方法的具体用法?C++ Thread::Main怎么用?C++ Thread::Main使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Thread
的用法示例。
在下文中一共展示了Thread::Main方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
DWORD WINAPI __win32thread_launcher(LPVOID lpParameter) {
Thread* t;
t = (Thread*) lpParameter;
t->SetSchedulingPriority();
t->LockMemory();
t->EnableDestructor();
t->Main();
return 0;
}
示例2:
DWORD WINAPI
Thread::thread_main(void *p_arg)
{
Thread *self = (Thread *)p_arg;
int ret = self->Main();
self->m_isRunning = false;
::emugl::ThreadStore::OnThreadExit();
return ret;
}
示例3: __pthread_launcher
/// Callback function for the POSIX thread API
static void* __pthread_launcher(void* thread) {
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); // let the thread be killable under any circumstances
Thread* t;
t = (Thread*) thread;
t->SetSchedulingPriority();
t->LockMemory();
t->EnableDestructor();
t->Main();
return NULL;
}
示例4: ThreadProc
DWORD WINAPI Thread::ThreadProc(void * user)
{
Thread * This = (Thread *)user;
try
{
This->Main(This->run);
return 0;
}
catch(...)
{
return 1;
}
}
示例5: TMain
void* Thread::TMain(void* param) {
Thread* pThis = (Thread*) param;
return pThis->Main();
}