how to create a global reactive poll that is a future?

I have an app that has the basic structure:

library(shiny)
library(future)
library(promises)
plan(multicore)

myPoll <- reactivePoll(100, NULL,
 checkFunc = function(){ ... },
 valueFunc = function(){ ... })

ui = fluidPage(
      fluidRow(
     verbatimTextOutput("test")
 )
)

 server <- function(input,output,session){

output$test <- renderPrint({

myPoll()

})

 }

shinyApp(ui = ui, server = server)

The value function in the reactivePoll is quite expensive. I was wondering if it was possible to make this asynchronous if it's global?

1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.