1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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

View file

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