title: How to not waiting on promise evaluation in R
body: <p>I would like to execute a very expensive function (called 'never_ending_calc' in the below example) in a separate R session in a shiny app. I already prepared the below code, it works fine, but my parent R session waits on the result of the promise object and this uses lots of resources. 
  If you check the task manager while the below test application is running, you will see that the parent R session uses one CPU thread on maximum capacity while just simply waiting on the results of the promise object. </p>
  
  <p>How can I evaluate a promise in a way which does not use the resources of the parent R session? (It is also ok if I loose the connection between these two sessions.)</p>
  
  <p>I tried the followings (none of them worked):</p>
  
  <ul>
  <li>use different 'plan'</li>
  <li>send a custom message (like a warning) from function 'never_ending_calc' on its first row to somehow stop the parent session to wait on the promise object </li>
  </ul>
  
  <p>Here is the example:</p>
  
  <pre><code>library(shiny)
  library(future)
  library(promises)
  library(future.callr)
  
  never_ending_calc &lt;- function(){
    K = 1
    for (i in 1:20){
      K = K + i
      Sys.sleep(5)
    }
    return(K)
  }
  
  ui &lt;- fluidPage(
  
    # App title ----
    titlePanel("Test app"),
  
    # Sidebar layout with input and output definitions ----
    sidebarLayout(
  
      # Sidebar panel ----
      sidebarPanel(
  
        # action button to start the long test calculation ----
        actionButton(inputId = "start_test",
                     label = "Start test run")
  
      ),
  
  
      mainPanel()
    )
  )
  
  
  server &lt;- function(input, output) {  
  
    observeEvent(input$start_test, {
  
    # start execute the long calculation in another separate R session
    future::plan(future.callr::callr)
    long_calculation_future &lt;&lt;- future::future({
      never_ending_calc()
    })
    promises::then(long_calculation_future,
                   onFulfilled = NULL,
                   onRejected = function(error){NULL})
    future::plan(future::sequential)
  
    # return NULL to keep the shiny app reactive
    NULL
  
    })
  
  
  }
  
  shinyApp(ui, server)
  </code></pre>