Skip to content
Snippets Groups Projects
Unverified Commit 75f2d0b6 authored by Todor Kondic's avatar Todor Kondic
Browse files

api: Add new phase -- concurrency

* R/api.R(concurrency): New function.

* R/resources.R(NO_WORKERS): New parameter.
parent 430c70e1
No related branches found
Tags v1.2.0
No related merge requests found
......@@ -187,6 +187,14 @@ vrfy_conf <- function(conf) {
return(conf)
}
## @export
concurrency <- function(m) {
m$conf$workers <- if (!is.null(m$conf$workers)) m$conf$workers else NO_WORKERS
future::plan("multiprocess",workers=m$conf$workers)
message("workers: ",m$conf$workers)
m
}
......
......@@ -132,3 +132,7 @@ EMPTY_MZML <- dtable(Files=character(0),
FN_DATA_TAB <- "data-files.csv"
## Default number of concurrent workers
NO_WORKERS <- 2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment