Skip to content

Commit e3de03f

Browse files
authored
Merge pull request #232 from shikokuchuo/update-mirai
Update for mirai 2.1.0
2 parents 820ad5e + 618a1be commit e3de03f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

R/appenders.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,10 @@ appender_async <- function(appender,
389389
fail_on_missing_package("mirai")
390390
force(appender)
391391

392-
# Start one background process (hence dispatcher not required)
393-
# force = FALSE allows multiple appenders to use same namespace logger
394-
mirai::daemons(1L, dispatcher = FALSE, force = FALSE, cleanup = FALSE, .compute = namespace)
392+
# Start one non-dispatcher background process if not already started
393+
if (is.null(mirai::nextget("n", .compute = namespace))) {
394+
mirai::daemons(1L, dispatcher = FALSE, cleanup = FALSE, .compute = namespace)
395+
}
395396
mirai::everywhere(
396397
{
397398
library(logger)

0 commit comments

Comments
 (0)