Re: [ROOT] thread-defed globals

From: Marc Hemberger (M.Hemberger@gsi.de)
Date: Wed Feb 23 2000 - 15:36:38 MET


Hi,

I send already in one of my last answers to Anton's question on TThread
some very simple example macros, which show how threads can be created and
used.

Nevertheless, as we also said it several times, there will be a HOWTO,
provided by us, for the usage of the TThread-class. Additionally, we will
also provide a chapter of the ROOT users manual on threading.

So please be kind and search the digest for what we from GSI have already
mentioned to the roottalk and look at the ROOT Workshop. There will be
more documentation available. 

Greetings,

Marc


Dr. Marc Hemberger

       |\      _,,,---,,         GSI, Abteilung DV&EE
ZZZzz  /,`.-'`'    -.  ;-;;,_    Planckstr. 1 
      |,4-  ) )-,_. ,\ (  `'-' 
     '---''(_/--'  `-'\_)        64291 Darmstadt

M.Hemberger@gsi.de

** Disclaimer: My views/comments/beliefs, as strange as they are, are my own.**


On Wed, 23 Feb 2000, Matevz Tadel wrote:

> Hi!
> 
> I found the truthfulness of statetement "TThread is not being easy to
> use correctly" the hard way ... when i first tried to use it a few
> weeks ago. Said to myself ... well ... need some more expirience with
> threads anyway ... and wrote a minimal wrapper classes for posix
> threads/mutexes. Then banged on the problem of setting gDirectory when 
> different threads create histograms in different directories ...
> 
> After reading the mail that gPad is protected went grepping thru the
> code and found
> TVirtualPad.h:#define gPad (Pad())
> but then failed to find Pad() function.
> I'd expect it to be sth like:
> TPad* Pad() {
>   TPad* p = Thread::GetSelf()->GetPad();
>   return p;
> }
> 
> Anyway ... is there sth like a manifesto/description of how to get
> this done without neurological surgery on root?
> Would defining 3 such functions, using #defines in some high enough
> place (like Rtypes.h) and recompile the ROOT do the trick?
> 
> Or are there some tricker mechanisms i'm completely ignorant of at the 
> moment?
> 
> just trying to understand ...
> 
> cheers,
> matevz
> 
> ---------------------------------------------------
>  Matevz Tadel,         E-mail: Matevz.Tadel@ijs.si 
>  Department of Experimental High Energy Physics F9 
>  Jozef Stefan Institute,  Jamova 39,  P.o.Box 3000 
>  SI-1001 Ljubljana, Slovenia                       
>  Tel.: +386-61-177-3674      Fax: +386-61-125-7074 
> ---------------------------------------------------
> 
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:19 MET