[ruby/timeout] Hack to avoid leak checker

https://github.com/ruby/timeout/commit/9a9b03b44c
This commit is contained in:
Nobuyoshi Nakada 2022-05-25 18:47:16 +09:00 committed by git
parent cdfb027213
commit e77e233935
1 changed files with 1 additions and 0 deletions

View File

@ -99,6 +99,7 @@ module Timeout
def self.create_timeout_thread def self.create_timeout_thread
Thread.new do Thread.new do
Thread.current.thread_variable_set(:"\0__detached_thread__", true)
requests = [] requests = []
while true while true
until QUEUE.empty? and !requests.empty? # wait to have at least one request until QUEUE.empty? and !requests.empty? # wait to have at least one request