later
later copied to clipboard
Warn/error when callbacks call run_now()?
Currently it's possible for a callback to call run_now()
. Perhaps later should warn/error when this happens? This is related to rstudio/httpuv#148.
In this example, the second run_now()
makes the callbacks run, but the same thing happens if that's removed and the execution of callbacks is triggered by R's input handler.
library(later)
{
later(function() {
cat("1")
later(function() cat("2"))
cat("3")
run_now()
cat("4")
})
cat("5")
run_now()
cat("6")
}
#> 513246