Package 'nice'

Title: Get or Set UNIX Niceness
Description: Get or set UNIX priority (niceness) of running R process.
Authors: Charles J. Geyer <[email protected]>.
Maintainer: Charles J. Geyer <[email protected]>
License: MIT + file LICENSE
Version: 0.4-2
Built: 2024-12-09 06:31:59 UTC
Source: CRAN

Help Index


Get or Set UNIX Priority

Description

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

Usage

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

  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.