[Rd] R_ReplDLLdo1 and task callbacks

From: Thomas Friedrichsmeier <thomas.friedrichsmeier_at_ruhr-uni-bochum.de>
Date: Sat, 05 Jun 2010 14:27:19 +0200


Dear R developers,

in RKWard we use a custom main loop built around R_ReplDLLdo1(). Recently I found out that toplevel task callback are not called. Looking at the source of R_ReplDLLdo1() in main.c, the reason is easy to see: This simply does not include a call to Rf_callToplevelHandlers().

There may well be reasons for that. On the other hand, I could not find explicit documentation to this effect, and according to svn annotate, R_ReplDLLdo1() predates task callbacks. So perhaps this is an oversight after all. Using the google code search, the only other use case I could find (besides R test cases, and RKWard) is the Mac-GUI. I would assume that calling the task callback handlers would be the desired behavior, there, too.

I did not find any way to integrate the task callback handlers from the embedding application, when using R_ReplDLLdo1(). Is there any? Would it be possible to add a call to Rf_callToplevelHandlers in R_ReplDLLdo1() (*)? Alternatively, would it be possible to add an equivalent of   R_ReplConsole(R_GlobalEnv, R_PPStackTop, 0); to the API (importantly without calls to setup_Rmainloop() and end_Rmainloop())?

Thanks,
Thomas

--

(*): In fact, I wonder, why R_ReplDLLdo1() is not simply based on 
Rf_ReplIteration().

______________________________________________ R-devel_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Received on Sat 05 Jun 2010 - 12:32:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 07 Jun 2010 - 13:50:57 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive