Nathaniel Smith wrote:
> On Mon, Feb 9, 2009 at 2:45 PM, Laurent Gautier <lgaut...@gmail.com> wrote:
>> <sigh> I couldn't find that one incantation when I looked for it:
>> R_runHandlers(R_InputHandlers, R_checkActivity(1, 1));
>>
>> I change it to
>> R_runHandlers(R_InputHandlers, R_checkActivity(0, 1));
>> because of
>> https://stat.ethz.ch/pipermail/r-devel/2003-August/027281.html
> 
> Ah, you're right -- I was extracting it out of unix/sys-std.c (it is
> not a well-documented incantation!), and I mis-read it as interpreting
> 0 as the magic "wait forever" flag.
> 
> Of course the Right answer would be to extract the fds that R cares
> about from R_InputHandlers and feed them into a real mainloop, etc.,
> but this sure helps for now!

It does already (so much that I'll backport the whole process_revent() 
to the version 2.0.x branch - that will be the killer feature for 2.0.3 !).

Dismantling R_runHandlers is indeed opening interesting perspectives.

> (Curiously, running a background thread that just calls
> process_revents() every 100 ms, I managed to trip the "Concurrent
> access to R is not allowed" checking in rinterface.c. I don't see how
> this is possible, since both threads should have been holding the GIL
> when they entered R, but there it is. Do you see any reason why this
> shouldn't work?)

Callbacks are the Achilles tendon, I suspect.
I had an independent locking mechanism for fear of something bad 
happening (concurrent access to R is "bad", in a Egon-to-Venkman "don't 
cross the streams" sense).



> -- Nathaniel


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to