From ripley at stats.ox.ac.uk  Mon Jun 16 10:31:41 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 16 Jun 2008 09:31:41 +0100 (BST)
Subject: [Rd] Execute expr with a timeout?
In-Reply-To: <48561E8C.7020806@sciviews.org>
References: <48561E8C.7020806@sciviews.org>
Message-ID: <alpine.LFD.1.10.0806160928550.14927@gannet.stats.ox.ac.uk>

See (R-devel)

     o	Experimental setTimeLimit() function to set limits on the CPU
 	and/or elapsed time for each top-level computation.

Note that this is unfinished, and the interface may well change before 
release.

On Mon, 16 Jun 2008, Philippe Grosjean wrote:

> Hello,
>
> Does someone know how to execute an expression in R, limiting the time to 
> evaluate it and raising an exception if it takes too long to run? Something 
> like:
>
>> with.timeout(expr, timeout = 10)
>
> which stops the evaluation of 'expr' if it is not done after 10 sec?
> Best,
>
> Philippe Grosjean
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
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



[Rd] Execute expr with a timeout?
Prof Brian Ripley