TThread* JPetTaskChainExecutor::run()
{
  TThread* thread = new TThread(std::to_string(fInputSeqId).c_str(), processProxy, (void*)this);
  assert(thread);
  thread->Run();
  return thread;
}
Esempio n. 2
0
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;
}
Esempio n. 3
0
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;
}
////////////////////////////////////////////
// Thread
void * TThread::EntryPoint(void * pArg) {
    TThread *pThis = (TThread *)pArg;
    pThis->Run();
    return 0;
}
Esempio n. 5
0
////////////////////////////////////////////
// Thread
DWORD WINAPI TThread::EntryPoint(LPVOID pArg) {
    TThread* pThis = (TThread*)pArg;
    pThis->Run();
    return 0;
}