Package org.jruby

Class RubyThreadGroup

All Implemented Interfaces:
Serializable, Cloneable, Comparable<IRubyObject>, InstanceVariables, InternalVariables, IRubyObject, CoreObjectType

public class RubyThreadGroup extends RubyObject
Implementation of Ruby's ThreadGroup class. This is currently just a stub.

See Also:
  • Field Details

    • rubyThreadList

      private final Set<RubyThread> rubyThreadList
    • enclosed

      private boolean enclosed
  • Constructor Details

    • RubyThreadGroup

      private RubyThreadGroup(Ruby runtime, RubyClass type)
  • Method Details

    • createThreadGroupClass

      public static RubyClass createThreadGroupClass(Ruby runtime)
    • add

      public IRubyObject add(IRubyObject rubyThread, Block block)
    • addDirectly

      void addDirectly(RubyThread rubyThread)
    • remove

      public void remove(RubyThread rubyThread)
    • enclose

      public IRubyObject enclose(Block block)
    • enclosed_p

      public IRubyObject enclosed_p(Block block)
    • list

      public IRubyObject list(Block block)
    • size

      public int size()
      Number of threads in this thread group. Note that threads that have recently died may still be counted here.
      Returns:
      number of threads in this thread group