Sync to changes in promise. run_now aggressively in serviceApp.

This commit is contained in:
Joe Cheng
2017-06-07 14:25:34 -07:00
parent 5e905aa73e
commit 7c845d070b
3 changed files with 5 additions and 5 deletions

View File

@@ -177,8 +177,8 @@ drawPlot <- function(name, session, func, width, height, pixelratio, res, ...) {
p1 <- promise::with_promise_domain(domain, {
p2 <- promise::resolved(func())
p2 <- promise::then(p2, function(value, visible) {
if (visible) {
p2 <- promise::then(p2, function(value, .visible) {
if (.visible) {
# A modified version of print.ggplot which returns the built ggplot object
# as well as the gtable grob. This overrides the ggplot::print.ggplot
# method, but only within the context of renderPlot. The reason this needs

View File

@@ -451,7 +451,7 @@ runloop <- function() {
# Run an application that was created by \code{\link{startApp}}. This
# function should normally be called in a \code{while(TRUE)} loop.
serviceApp <- function() {
if (timerCallbacks$executeElapsed()) {
if (later::run_now() || timerCallbacks$executeElapsed()) {
for (shinysession in appsByToken$values()) {
shinysession$manageHiddenOutputs()
}

View File

@@ -343,7 +343,7 @@ renderPrint <- function(expr, env = parent.frame(), quoted = FALSE,
function(err) { cat(file=stderr(), "ERROR", err$message) }
)
})
p1 <- finally(p1, ~close(domain$conn))
p1 <- promise::finally(p1, ~close(domain$conn))
p1
}
@@ -353,7 +353,7 @@ renderPrint <- function(expr, env = parent.frame(), quoted = FALSE,
createRenderPrintPromiseDomain <- function(width) {
f <- file()
new_promise_domain(
promise::new_promise_domain(
wrapOnFulfilled = function(onFulfilled) {
force(onFulfilled)
function(...) {