Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TThreadFactory.h
Go to the documentation of this file.
1 // @(#)root/thread:$Id$
2 // Author: Fons Rademakers 01/07/97
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #ifndef ROOT_TThreadFactory
14 #define ROOT_TThreadFactory
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TThreadFactory //
19 // //
20 // This ABC is a factory for thread components. Depending on which //
21 // factory is active one gets either Posix or Win32 threads. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TNamed.h"
26 
27 class TMutexImp;
28 class TConditionImp;
29 class TThreadImp;
30 class TThread;
31 
32 class TThreadFactory : public TNamed {
33 
34 public:
35  TThreadFactory(const char *name = "Unknown", const char *title = "Unknown Thread Factory");
36  virtual ~TThreadFactory() { }
37 
38  virtual TMutexImp *CreateMutexImp(Bool_t recursive) = 0;
39  virtual TConditionImp *CreateConditionImp(TMutexImp *m) = 0;
40  virtual TThreadImp *CreateThreadImp() = 0;
41 
42  ClassDef(TThreadFactory,0) // Thread factory ABC
43 };
44 
45 R__EXTERN TThreadFactory *gThreadFactory;
46 
47 #endif
48 
49 
50