Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ThreadGroup#list patch for JRuby 1.7.4 (-1.7.18)
if JRUBY_VERSION < '1.7.19'
require 'thread'; require 'java'
org.jruby.RubyThreadGroup.field_reader :rubyThreadList
ThreadGroup.class_eval do
def list
threads = []
list = to_java.rubyThreadList
list.synchronized do # iterator must be sync-ed
list.each { |t| threads << t if t }
end
threads
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.