Skip to content

Instantly share code, notes, and snippets.

@jcheng5
Created May 6, 2020 03:26
Show Gist options
  • Save jcheng5/dae9ad798bfb1b65c4ce21b1e6357cf9 to your computer and use it in GitHub Desktop.
Save jcheng5/dae9ad798bfb1b65c4ce21b1e6357cf9 to your computer and use it in GitHub Desktop.
assign("msg", local({
i <- 0
function(url, ...) {
i <<- i + 1
on.exit(i <<- i - 1)
if (i > 1) {
message("reentrancy detected!")
return("reentrancy detected!")
}
cat("") # Calls R_ProcessEvents()
list("success", "text/plain")
}
}), tools:::.httpd.handlers.env)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment