Don't allow invalidation from a child process

This commit is contained in:
Joe Cheng
2018-01-25 12:48:27 -08:00
parent 91ac89a54e
commit 35d1747bc3

View File

@@ -51,6 +51,11 @@ Context <- R6Class(
invalidate = function() {
"Invalidate this context. It will immediately call the callbacks
that have been registered with onInvalidate()."
if (!identical(.pid, processId())) {
stop("Reactive context was created in one process and invalidated from another")
}
if (.invalidated)
return()
.invalidated <<- TRUE