This cannot presently be done, as the R internals do not multitask. I am
not sure what you would want to happen if the background and foreground
commands both tried to write a new version of object `foo', BTW.
Allowing multiple execution threads and setReader() as described in the
Green Book is a design goal and has been since 2001 at least, so don't
expect it soon. It is hard (lots of the code used, e.g. LINPACK, is not
reentrant and so needs to be semaphored) and if achieved will need
vigilance to keep working.
On Fri, 4 Jun 2004, Bickel, David wrote:
> Is there a way to call an R function to work in the background within
> the same R session? What I have in mind is the equivalent of adding
'&'
> at the end of a UNIX command, so that R can process an intensive command
> while I execute other R commands. I want to do this in the same R
> session, rather than with multiple calls to R, so that all my modified
> objects will stay in the same workspace.
>
> I would appreciate any help with this.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595