Skip to content

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

class method

Thread.ignore_deadlock=

Thread.ignore_deadlock = boolean → true or false

Returns the new state. When set to true, the VM will not check for deadlock conditions. It is only useful to set this if your application can break a deadlock condition via some other means, such as a signal.

Example
Thread.ignore_deadlock = true
queue = Thread::Queue.new

trap(:SIGUSR1){queue.push "Received signal"}

# raises fatal error unless ignoring deadlock
puts queue.pop

See also ::ignore_deadlock.

See also .ignore_deadlock .kill .handle_interrupt .list also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0