Terminate R Process through Shiny

Does anyone know how to allow a general application user to terminate a running process when running a shiny app locally or on a server. Some of my machine learning processes are quite long and I want to provide an option to the end user the ability to terminate a running R process since they have no direct access to the server.

thank you

Use ipc to launch long processes in shiny and facilitates aborting them
"Tools for Inter-Process Communication" https://cran.r-project.org/web/packages/ipc/vignettes/shinymp.html