Re: gSystem->InnerLoop() ;

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Aug 28 1998 - 14:22:12 MEST


Like I said before. If there is nothing to monitor the system will
block in select(). As is the case here. Use a sync TTimer to let
InnerLoop timeout when there are no file descriptor event.

Cheers, Fons.


Wouter Hulsbergen wrote:
> 
> Dear all,
> I am trying to understand a bit more of the TMonitor class. Can anybody
> tell me why the following stops as soon as it reaches
> gSystem->InnerLoop() ?
> 
> int main(int argc, char** argv)
> {
>   static TROOT theROOT("OTHRoot","OTHRoot",initfuncs) ;
>   TApplication* theApp = new TApplication("Applic",&argc,argv) ;
> 
>   for(int i=0; i<100000; i++)
>     {
>       cout << i << endl;
>       gSystem->InnerLoop() ;
>     }
>   return(0);
> };
> 
> The loop over gSystem->InnerLoop() is exactly what appears in
> TMonitor::Select(). What did I forget ?
> 
> Regards, thanks,
> Wouter

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:37 MET