33 HANDLE hHandle = CreateThread(0, 0,
35 th, 0, (DWORD*)&dwThreadId);
37 ::CloseHandle(hHandle);
40 th->fHandle = (
Long_t)hHandle;
44 return hHandle ? 0 : EINVAL;
53 DWORD
R = WaitForSingleObject((HANDLE)th->
fHandle, INFINITE);
55 if ( (R == WAIT_OBJECT_0) || (R == WAIT_ABANDONED) ) {
59 if ( R == WAIT_TIMEOUT )
79 if (TerminateThread((HANDLE)th->
fHandle,0)) {
90 if (!free) fprintf(stderr,
"CleanUpPush ***ERROR*** Routine=0\n");
101 if (!l->
fRoutine) fprintf(stderr,
"CleanUpPop ***ERROR*** Routine=0\n");
103 *main = l->
fNext;
delete l;
111 fprintf(stderr,
" CleanUp %lx\n",(
ULong_t)*main);
121 return (
Long_t)::GetCurrentThreadId();
129 Warning(
"SetCancelOff",
"Not implemented on Win32");
138 Warning(
"SetCancelOn",
"Not implemented on Win32");
147 Warning(
"SetCancelAsynchronous",
"Not implemented on Win32");
156 Warning(
"SetCancelDeferred",
"Not implemented on Win32");
165 Warning(
"CancelPoint",
"Not implemented on Win32");
TWin32ThreadCleanUp * fNext
virtual Int_t CancelPoint()
RooArgList L(const RooAbsArg &v1)
virtual Int_t Kill(TThread *th)
This is a somewhat dangerous function; it's not suggested to Stop() threads a lot.
virtual Int_t SetCancelDeferred()
TPaveText exe(6, 5.5, 12, 8)
virtual Long_t SelfId()
Return the current thread's ID.
ClassImp(TWin32Thread) Int_t TWin32Thread
Win32 threads – spawn new thread (like pthread_create).
virtual Int_t SetCancelOff()
virtual Int_t CleanUpPop(void **main, Int_t exe)
virtual Int_t Exit(void *ret)
Exit the thread.
virtual Int_t SetCancelAsynchronous()
TWin32ThreadCleanUp(void **main, void *routine, void *arg)
virtual Int_t SetCancelOn()
typedef void((*Func_t)())
virtual Int_t CleanUpPush(void **main, void *free, void *arg)
virtual Int_t CleanUp(void **main)
static void * Function(void *ptr)
Static method which is called by the system thread function and which in turn calls the actual user f...
virtual Int_t Join(TThread *th, void **ret)
Wait for specified thread execution (if any) to complete (like pthread_join).
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.