Skip to content

Commit

Permalink
use snapshot()
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Dec 29, 2023
1 parent 0d85ac2 commit e9cdab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion R/daemon.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ daemon <- function(url, autoexit = TRUE, cleanup = TRUE, output = FALSE,
close(devnull)
}, add = TRUE)
}
`[[<-`(`[[<-`(`[[<-`(., "op", .Options), "se", search()), "vars", names(.GlobalEnv))
snapshot()
count <- 0L
start <- mclock()

Expand Down Expand Up @@ -212,3 +212,6 @@ perform_cleanup <- function(cleanup) {
if (cleanup[3L]) options(.[["op"]])
if (cleanup[4L]) gc(verbose = FALSE)
}

snapshot <- function() `[[<-`(`[[<-`(`[[<-`(., "op", .Options), "se", search()), "vars", names(.GlobalEnv))

2 changes: 0 additions & 2 deletions R/mirai.R
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,6 @@ mk_mirai_error <- function(e) {
`class<-`(msg, c("miraiError", "errorValue", "try-error"))
}

snapshot <- function() `[[<-`(`[[<-`(`[[<-`(., 'vars', names(.GlobalEnv)), 'se', search()), 'op', .Options)

.interrupt_error <- `class<-`("", c("miraiInterrupt", "errorValue", "try-error"))
.snapshot <- expression(mirai:::snapshot())
.timedelay <- expression(nanonext::msleep(500L))

0 comments on commit e9cdab9

Please sign in to comment.