Skip to content

Instantly share code, notes, and snippets.

@nirguk
nirguk / MiraiExtendedTask.R
Last active August 9, 2024 13:24
Idea on how shiny::ExtendedTask might be subclassed to support cancel/early stop of tasks which are mirai backed
# credit Joe Cheng / jcheng5 / https://gist.github.com/jcheng5/1283baec96c05a65778d931a8b7c7314
# for mirai cancel concept
library(shiny)
library(mirai)
library(promises)
library(bslib)
library(R6)
# SETUP ####
# Define a subclass that inherits from ExtendedTask
MiraiExtendedTask <- R6::R6Class(