Get or Set UNIX Priority

Share:

Description

Get or Set UNIX Priority (Niceness) of this R process.

Usage

1
2
get.my.priority()
set.my.priority(priority = 15)

Arguments

priority

The UNIX priority, also called niceness, what the UNIX commands nice and renice set, (an integer number, usually in the range -20 to 19, that we want to set the priority to). Generally, ordinary users can only raise the priority, so it is an error to try to set the priority lower than that returned by get.my.priority.

Details

Sets the priority of itself, the unix process that is executing this R code. The command was written for use with the snow package (for nicing slaves), using syntax something like

1
  invisible(clusterEvalQ(cl, set.my.priority()))

assuming a cluster cl has already been set up. It may also be useful in other situations.

Value

get.my.priority returns the priority. set.my.priority returns no value. It has the side effect of setting the priority.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.