Re: gSystem->InnerLoop() ;

Fons Rademakers (Fons.Rademakers@cern.ch)
Fri, 28 Aug 1998 14:22:12 +0200


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