summaryrefslogtreecommitdiff
path: root/lib/timeout.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r--lib/timeout.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb
index 7f40bafa4d..1d092f7c05 100644
--- a/lib/timeout.rb
+++ b/lib/timeout.rb
@@ -120,7 +120,7 @@ module Timeout
requests.reject!(&:done?)
end
end
- ThreadGroup::Default.add(watcher)
+ ThreadGroup::Default.add(watcher) unless watcher.group.enclosed?
watcher.name = "Timeout stdlib thread"
watcher.thread_variable_set(:"\0__detached_thread__", true)
watcher