コード例 #1
0
TThread* JPetTaskChainExecutor::run()
{
  TThread* thread = new TThread(std::to_string(fInputSeqId).c_str(), processProxy, (void*)this);
  assert(thread);
  thread->Run();
  return thread;
}
コード例 #2
0
ファイル: thread_posix.cpp プロジェクト: Zala/qminer
void * TThread::EntryPoint(void * pArg) {
    TThread *pThis = (TThread *)pArg;

    // set the routine which cleans up after the thread has finished
    pthread_cleanup_push(SetFinished, pThis);

    try {
        pThis->Run();
    } catch (...) {
        printf("Unknown exception while running thread: %ul!\n", pThis->GetThreadId());
    }

    // pop and execute the cleanup routine
    pthread_cleanup_pop(1);
    return 0;
}
コード例 #3
0
ファイル: thread_posix.cpp プロジェクト: blazf/qminer
void * TThread::EntryPoint(void * pArg) {
    TThread *pThis = (TThread *)pArg;

    // set the routine which cleans up after the thread has finished
    pthread_cleanup_push(SetFinished, pThis);

    try {
        pThis->Run();
    } catch (const PExcept& Except) {
        printf("Exception in thread %ld: %s\n", (long)pThis->GetThreadId(), Except->GetMsgStr().CStr());
    } catch (...) {
        printf("Unknown exception while running thread: %s!\n", TUInt64::GetStr(pThis->GetThreadId()).CStr());
    }

    // pop and execute the cleanup routine
    pthread_cleanup_pop(1);
    return 0;
}
コード例 #4
0
////////////////////////////////////////////
// Thread
void * TThread::EntryPoint(void * pArg) {
    TThread *pThis = (TThread *)pArg;
    pThis->Run();
    return 0;
}
コード例 #5
0
ファイル: thread_win.cpp プロジェクト: edgeflip/dmoz
////////////////////////////////////////////
// Thread
DWORD WINAPI TThread::EntryPoint(LPVOID pArg) {
    TThread* pThis = (TThread*)pArg;
    pThis->Run();
    return 0;
}