Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

Process.setpriority

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

See Process.getpriority.

Examples:

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

Not available on all platforms.

See also .setpgrp .setproctitle .setpgid .setrlimit also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0