Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn/error when callbacks call run_now()? #60

Open
wch opened this issue Jun 6, 2018 · 0 comments
Open

Warn/error when callbacks call run_now()? #60

wch opened this issue Jun 6, 2018 · 0 comments

Comments

@wch
Copy link
Member

wch commented Jun 6, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant