From duncan at research.bell-labs.com  Thu Aug 14 08:08:44 2003
From: duncan at research.bell-labs.com (Duncan Temple Lang)
Date: Thu Aug 14 13:08:29 2003
Subject: [Rd] event loop
In-Reply-To: <3CF0F036-CE3C-11D7-B052-003065CC4CB8@mclink.it>;
	from jago@mclink.it on Thu, Aug 14, 2003 at 11:46:54AM +0200
References: <84C1147A-CE36-11D7-B052-003065CC4CB8@mclink.it>
	<3CF0F036-CE3C-11D7-B052-003065CC4CB8@mclink.it>
Message-ID: <20030814070843.A8833@jessie.research.bell-labs.com>

Stefano Iacus wrote:
> Ok, I've find out the solution.
> 
> I'm using
> 
> R_runHandlers(R_InputHandlers, R_checkActivity(10, 1));
> 
> in the EventLoopTimer.
> 
> Now x11 works fine and also RGL run smoothly.

Great; nice work.

> 
> I'm sure about the parameters used in R_checkActivity. Any hints is 
> welcome.

The 1 merely ensures that we don't look for events on stdin
and concentrate only on the secondary event sources.
So this is the right thing.

The 10 (first argument) is the number of microseconds to wait/block
when looking for input on any of the event queues (file descriptors).
You could make this 0 and the call to select() will return immediately
and not wait for events. This might be the right thing when running in
a timer action.

 D.

> 
> 
> stefano
> 
> On Gioved?, ago 14, 2003, at 11:05 Europe/Rome, Stefano Iacus wrote:
> 
> > I've installed a timer in RAqua to do tasks at time interval.
> > I would like simply to let R call all the handlers installed (eg x11, 
> > gtk, tcltk) on this time interval and return.
> > Which function whould I call?
> >
> > stefano
> >
> > ______________________________________________
> > R-devel@stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> >
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

-- 
_______________________________________________________________

Duncan Temple Lang                duncan@research.bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-3217
700 Mountain Avenue, Room 2C-259  fax:    (908)582-3340
Murray Hill, NJ  07974-2070       
         http://cm.bell-labs.com/stat/duncan


[Rd] event loop
Duncan Temple Lang