Skip to content

Instantly share code, notes, and snippets.

View ar0ch's full-sized avatar
🔬
Doing sciencey things

Aroon Chande ar0ch

🔬
Doing sciencey things
View GitHub Profile
@ar0ch
ar0ch / create_forked_task.R
Created April 3, 2018 13:10 — forked from jcheng5/create_forked_task.R
Concurrent, forked, cancellable tasks in Shiny
library(shiny)
# Also uses parallel, shinyjs, tools
# Create a long-running task, executed in a forked process. (Doesn't work on Windows)
#
# The return value is a promise-like object with three
# methods:
# - completed(): FALSE initially, then TRUE if the task succeeds,
# fails, or is cancelled. Reactive, so when the state changes
# any reactive readers will invalidate.