00001 // @(#)root/thread:$Id: TThreadImp.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: Victor Perev 10/08/97 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TThreadImp 00013 #define ROOT_TThreadImp 00014 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TThreadImp // 00019 // // 00020 // This class implements threads. A thread is an execution environment // 00021 // much lighter than a process. A single process can have multiple // 00022 // threads. The actual work is done via the TThreadImp class (either // 00023 // TPosixThread or TWin32Thread). // 00024 // // 00025 ////////////////////////////////////////////////////////////////////////// 00026 00027 #ifndef ROOT_TObject 00028 #include "TObject.h" 00029 #endif 00030 #ifndef ROOT_TThread 00031 #include "TThread.h" 00032 #endif 00033 00034 class TThreadImp : public TObject { 00035 public: 00036 TThreadImp() { } 00037 virtual ~TThreadImp() { } 00038 00039 virtual Int_t Join(TThread *th, void **ret) = 0; 00040 virtual Long_t SelfId() = 0; 00041 virtual Int_t Run(TThread *th) = 0; 00042 00043 virtual Int_t Kill(TThread *th) = 0; 00044 virtual Int_t SetCancelOff() = 0; 00045 virtual Int_t SetCancelOn() = 0; 00046 virtual Int_t SetCancelAsynchronous() = 0; 00047 virtual Int_t SetCancelDeferred() = 0; 00048 virtual Int_t CancelPoint() = 0; 00049 virtual Int_t CleanUpPush(void **main, void *free,void *arg) = 0; 00050 virtual Int_t CleanUpPop(void **main, Int_t exe) = 0; 00051 virtual Int_t CleanUp(void **main) = 0; 00052 00053 virtual Int_t Exit(void *ret) = 0; 00054 00055 ClassDef(TThreadImp,0) // ThreadImp class 00056 }; 00057 00058 #endif