2

Could someone walk me through the specific side effects and internals of base::setTimeLimit()?

Reason: I am trying to impose optional timeouts for drake targets, and I turned to R.utils::withTimeout(), which uses base::setTimeLimit(). Drake timeouts work in an interactive R session, but they are unreliable when I test them into unit tests. I want to dig into the ways that base::setTimeLimit() modifies the global environment so I can do more debugging.

landau
  • 5,636
  • 1
  • 22
  • 50
  • For what it's worth, `R.utils` has package tests for `withTimeout()` asserting that it works (also in non-interactive mode as in R CMD check), cf. https://github.com/HenrikBengtsson/R.utils/blob/master/tests/withTimeout.R – HenrikB Oct 25 '17 at 17:07
  • @HenrikB sorry, I did not mean to point the finger at `R.utils`. I was just baffled by some of the inconsistencies in `drake` timeouts. I simplified some of the exception handling last night, and I cannot seem to reproduce any of the old errors I was getting. But I still want to know how `base::setTimeLimit()` works on the inside. – landau Oct 25 '17 at 18:58
  • No worries, that's not how I took it. I just shared facts that might rule out certain things in the troubleshooting forest. – HenrikB Oct 25 '17 at 20:10

0 Answers0