node-priority
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

node-priority

Build Status

This package provides access to the getpriority(2) and setpriority(2) system calls available on OSX, Linux and other UNIX variants. This can be used, for example, to implement the UNIX nice(1) utility.

Usage

var priority = require('node-priority');
 
priority.set(priority.Process, 0, 10, function(err) {
    if (err)
        throw err;
    priority.get(priority.Process, 0, function(err, prio) {
        console.log('successfully set priority to ' + prio);
    });
});

Package Sidebar

Install

npm i node-priority

Weekly Downloads

1

Version

0.1.5

License

MIT

Last publish

Collaborators

  • bpowers