GeoEco.R.RWorkerProcess.Stop

RWorkerProcess.Stop(timeout=5.0)

Stop the R worker process.

When you instantiate RWorkerProcess as part of a with statement, Stop() will be called automatically when the code block is exited:

with RWorkerProcess(...) as r:
    ...

Otherwise, you should call Stop() yourself when the R worker process is no longer needed.

Note

Stop() is not automatically called when the RWorkerProcess goes out of scope or otherwise is deleted. So if it is important to stop the R worker process before the process hosting the Python interpreter exits, you should use the with statement or manually call Stop(). The R worker process will be stopped automatically when the Python process exits, though.

Parameters:

timeout (float, optional) –

Maximum amount of time, in seconds, to wait for R to shut down. In general, R should shut down quickly. During normal operation, all interactions with R are blocking, so R should be idle when this function is called. To allow an infinite amount of time, provide None from Python or delete all text from this text box in the ArcGIS user interface.

Warning

If you allow an infinite amount of time and R never stops, your program will be blocked forever. Use caution.

Must be greater than 0.0.