node-priority
Advanced tools
+1
-1
| { | ||
| "name": "node-priority", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "description": "exposes the getpriority and setpriority system calls for adjusting priority", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/bpowers/node-priority", |
+2
-11
@@ -17,19 +17,10 @@ # node-priority | ||
| var priority = require('node-priority'); | ||
| var getpriority = priority.get; | ||
| var setpriority = priority.set; | ||
| setpriority(priority.Process, 0, 10, function(err) { | ||
| priority.set(priority.Process, 0, 10, function(err) { | ||
| if (err) | ||
| throw err; | ||
| getpriority(priority.Process, 0, function(err, prio) { | ||
| priority.get(priority.Process, 0, function(err, prio) { | ||
| console.log('successfully set priority to ' + prio); | ||
| }); | ||
| }); | ||
| setpriority(function(err, rfd, wfd) { | ||
| if (err) { | ||
| console.log('pipe failed, maybe out of FDs? ' + err); | ||
| return; | ||
| } | ||
| }); | ||
| ``` |
7518
-2.64%26
-25.71%