diff --git a/core/thread.rbs b/core/thread.rbs index 59b2c6957..70b968035 100644 --- a/core/thread.rbs +++ b/core/thread.rbs @@ -169,6 +169,37 @@ class Thread < Object # def self.main: () -> Thread + # + # Returns the status of the global ``ignore deadlock'' condition. The default is + # `false`, so that deadlock conditions are not ignored. + # + # See also ::ignore_deadlock=. + # + def self.ignore_deadlock: () -> bool + + # + # 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. + # + # 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. + # + def self.ignore_deadlock=: (bool) -> bool + #