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

Quitting out of browser prompt in a then() causes promises to stop working #5

Open
wch opened this issue Sep 19, 2017 · 2 comments
Open

Comments

@wch
Copy link
Collaborator

wch commented Sep 19, 2017

To reproduce, run the following. When the Browse prompt appears, press Q. Then run the second code block; it will only print 1 and 2.

promise(function(resolve, reject) {
  cat("1\n", file=stderr())
  resolve("OK")
  cat("2\n", file=stderr())
}) %...>% then(function(value) {
  cat("3: ", value, "\n", file=stderr())
  # When you get to this prompt, type Q to exit
  browser()
  cat("4\n", file=stderr())
})


# When you run this code after the code above, it only prints 1 and 2.
promise(function(resolve, reject) {
  cat("1\n", file=stderr())
  resolve("OK")
  cat("2\n", file=stderr())
}) %...>% then(function(value) {
  cat("3: ", value, "\n", file=stderr())
  cat("4\n", file=stderr())
})
@wch
Copy link
Collaborator Author

wch commented Sep 19, 2017

This might be caused by r-lib/later#12.

@wch
Copy link
Collaborator Author

wch commented Sep 20, 2017

According to the discussion in RcppCore/Rcpp#753, this may not be fixable.

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