Set and get the number of threads used for processing data.

set_number_of_threads(x = 1L)

get_number_of_threads()

Arguments

x

integer number of threads to use for processing.

Value

get_number_of_threads

integer number of threads.

set_number_of_threads

invisible logical indicating success.

Details

To stop processing data in parallel, set the number of threads to one. Note that neither of these functions influence the number of threads used when solving a conservation planning problem.

See also

Examples

# set number of threads to 2 set_number_of_threads(2) # get number of threads get_number_of_threads()
#> [1] 2
# reset number of threads to 1 set_number_of_threads(1) # get number of threads get_number_of_threads()
#> [1] 1