@@ -0,0 +1,1157 @@
+/**%0D%0A * Copyright 2005-2007 Yu Zhang%0D%0A * Distributed under the GNU General Public License 2.0%0D%0A */%0D%0A%0D%0Apackage com.xruby.runtime.value;%0D%0A%0D%0Aimport java.util.Vector;%0D%0Aimport java.util.List;%0D%0A%0D%0Aimport com.xruby.runtime.lang.RubyBasic;%0D%0Aimport com.xruby.runtime.lang.RubyRuntime;%0D%0A%0D%0Apublic class RubyThreadGroup extends RubyBasic%7B%0D%0A    %0D%0A    private List%3CRubyThread%3E threads_ = new Vector%3CRubyThread%3E();%0D%0A    %0D%0A    public static RubyThreadGroup defaultThreadGroup = new RubyThreadGroup();   %0D%0A    %0D%0A    public RubyThreadGroup()%7B%0D%0A        super(RubyRuntime.ThreadGroupClass);%0D%0A    %7D%0D%0A    %0D%0A    public void add(RubyThread thread)%7B%0D%0A        if(thread.getThreadGroup() != ObjectFactory.NIL_VALUE)%7B%0D%0A            RubyThreadGroup group = (RubyThreadGroup)thread.getThreadGroup();%0D%0A            group.threads_.remove(thread);%0D%0A        %7D%0D%0A        thread.setThreadGroup(this);%0D%0A        threads_.add(thread);%0D%0A    %7D%0D%0A    %0D%0A    //When a thread terminates,remove it from this group.%0D%0A    public void remove(RubyThread thread)%7B%0D%0A        thread.setThreadGroup(null);%0D%0A        threads_.remove(thread);%0D%0A    %7D%0D%0A    %0D%0A    public List list()%7B%0D%0A        return threads_;%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

add RubyThreadGroup class