Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Process.setpriority

Process.setpriority(kind, integer, priority) → 0

See Process.getpriority.

Example
Process.setpriority(Process::PRIO_USER, 0, 19)      #=> 0
Process.setpriority(Process::PRIO_PROCESS, 0, 19)   #=> 0
Process.getpriority(Process::PRIO_USER, 0)          #=> 19
Process.getpriority(Process::PRIO_PROCESS, 0)       #=> 19
See also .setpgrp .setproctitle .setpgid .setrlimit also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0