Logo Search packages:      
Sourcecode: jruby0.9 version File versions  Download package

org::jruby::RubyThread Class Reference

Inheritance diagram for org::jruby::RubyThread:

org::jruby::RubyObject org::jruby::runtime::builtin::IRubyObject

List of all members.


Detailed Description

Implementation of Ruby's Thread class. Each Ruby thread is mapped to an underlying Java Virtual Machine thread.

Thread encapsulates the behavior of a thread of execution, including the main thread of the Ruby script. In the descriptions that follow, the parameter aSymbol refers to a symbol, which is either a quoted string or a Symbol (such as :name).

Note: For CVS history, see ThreadClass.java.

Author:
Jason Voegele (jason@jvoegele.com)

Definition at line 69 of file RubyThread.java.


Public Member Functions

RubyBoolean abort_on_exception ()
IRubyObject abort_on_exception_set (IRubyObject val)
void addFinalizer (RubyProc finalizer)
IRubyObject anyToString ()
IRubyObject aref (IRubyObject key)
IRubyObject aset (IRubyObject key, IRubyObject value)
RubyString asString ()
String asSymbol ()
void attachToObjectSpace ()
void callInit (IRubyObject[] args, Block block)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject arg)
IRubyObject callMethod (ThreadContext context, String name, Block block)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name)
IRubyObject callMethod (ThreadContext context, String name)
IRubyObject callMethod (ThreadContext context, RubyModule rubyclass, String name, IRubyObject[] args, CallType callType, Block block)
IRubyObject callMethod (ThreadContext context, RubyModule rubyclass, int methodIndex, String name, IRubyObject[] args, CallType callType, Block block)
IRubyObject callMethod (ThreadContext context, RubyModule rubyclass, int methodIndex, String name, IRubyObject[] args, CallType callType)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject[] args, CallType callType)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject[] args)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject arg)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, CallType callType, Block block)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, CallType callType)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, Block block)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args)
IRubyObject callSuper (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject checkArrayType ()
IRubyObject checkStringType ()
void cleanTerminate (IRubyObject result)
IRubyObject compilerCallMethod (ThreadContext context, String name, IRubyObject[] args, IRubyObject self, CallType callType, Block block)
IRubyObject compilerCallMethodWithIndex (ThreadContext context, int methodIndex, String name, IRubyObject[] args, IRubyObject self, CallType callType, Block block)
RubyArray convertToArray ()
RubyFloat convertToFloat ()
RubyHash convertToHash ()
RubyInteger convertToInteger ()
RubyString convertToString ()
IRubyObject convertToType (RubyClass targetType, int convertMethodIndex, String convertMethod, boolean raiseOnMissingMethod, boolean raiseOnWrongTypeResult, boolean allowNilThrough)
IRubyObject convertToType (RubyClass targetType, int convertMethodIndex, boolean raise)
IRubyObject convertToType (RubyClass targetType, int convertMethodIndex, String convertMethod, boolean raise)
IRubyObject convertToTypeWithCheck (RubyClass targetType, int convertMethodIndex, String convertMethod)
synchronized Object dataGetStruct ()
synchronized void dataWrapStruct (Object obj)
IRubyObject display (IRubyObject[] args)
IRubyObject dup ()
boolean eql (IRubyObject other)
final boolean eqlInternal (final ThreadContext context, final IRubyObject other)
IRubyObject equal (IRubyObject other)
final IRubyObject equalInternal (final ThreadContext context, final IRubyObject other)
boolean equals (Object other)
IRubyObject evalSimple (ThreadContext context, IRubyObject src, String file)
IRubyObject evalUnder (RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line)
IRubyObject evalWithBinding (ThreadContext context, IRubyObject src, IRubyObject scope, String file)
void exceptionRaised (RaiseException exception)
IRubyObject exit ()
IRubyObject extend (IRubyObject[] args)
IRubyObject freeze ()
RubyBoolean frozen ()
IRubyObject getInstanceVariable (String name)
Map getInstanceVariables ()
Map getInstanceVariablesSnapshot ()
Class getJavaClass ()
final RubyClass getMetaClass ()
int getNativeTypeIndex ()
Ruby getRuntime ()
RubyClass getSingletonClass ()
RubyClass getSingletonClassClone ()
RubyClass getType ()
IRubyObject group ()
RubyBoolean has_key (IRubyObject key)
RubyFixnum hash ()
int hashCode ()
synchronized RubyFixnum id ()
synchronized RubyFixnum id_deprecated ()
IRubyObject infectBy (IRubyObject obj)
IRubyObject inherited (IRubyObject arg, Block block)
IRubyObject initialize (IRubyObject[] args, Block block)
IRubyObject initialize_copy (IRubyObject original)
IRubyObject inspect ()
IRubyObject instance_eval (IRubyObject[] args, Block block)
RubyBoolean instance_of (IRubyObject type)
IRubyObject instance_variable_get (IRubyObject var)
IRubyObject instance_variable_set (IRubyObject var, IRubyObject value)
RubyArray instance_variables ()
Iterator instanceVariableNames ()
RubyBoolean is_alive ()
final boolean isFalse ()
boolean isFrozen ()
boolean isImmediate ()
boolean isKindOf (RubyModule type)
boolean isNil ()
boolean isSingleton ()
RubyBoolean isStopped ()
boolean isTaint ()
final boolean isTrue ()
RubyThread join (IRubyObject[] args)
RubyArray keys ()
IRubyObject kill ()
RubyBoolean kind_of (IRubyObject type)
RubyClass makeMetaClass (RubyClass superClass, SinglyLinkedList parentCRef)
IRubyObject match (IRubyObject arg)
IRubyObject method (IRubyObject symbol)
IRubyObject method_missing (IRubyObject[] args, Block block)
IRubyObject methods (IRubyObject[] args)
IRubyObject nil_p ()
IRubyObject obj_equal (IRubyObject obj)
void pollThreadEvents ()
RubyFixnum priority ()
IRubyObject priority_set (IRubyObject priority)
IRubyObject private_methods ()
IRubyObject protected_methods ()
IRubyObject public_methods (IRubyObject[] args)
IRubyObject raise (IRubyObject[] args, Block block)
IRubyObject rbClone ()
IRubyObject remove_instance_variable (IRubyObject name, Block block)
void removeFinalizers ()
IRubyObject removeInstanceVariable (String name)
RubyBoolean respond_to (IRubyObject[] args)
boolean respondsTo (String name)
IRubyObject run ()
Map safeGetInstanceVariables ()
boolean safeHasInstanceVariables ()
IRubyObject send (IRubyObject[] args, Block block)
void setFrozen (boolean frozen)
IRubyObject setInstanceVariable (String name, IRubyObject value)
IRubyObject setInstanceVariable (String name, IRubyObject value, String taintError, String freezeError)
void setInstanceVariables (Map instanceVariables)
void setMetaClass (RubyClass metaClass)
void setTaint (boolean taint)
RubyArray singleton_methods (IRubyObject[] args)
void sleep (long millis) throws InterruptedException
IRubyObject specificEval (RubyModule mod, IRubyObject[] args, Block block)
IRubyObject status ()
IRubyObject taint ()
RubyBoolean tainted ()
IRubyObject to_s ()
String toString ()
RubyClass type ()
RubyClass type_deprecated ()
IRubyObject untaint ()
IRubyObject value ()
RubyThread wakeup ()

Static Public Member Functions

static RubyBoolean abort_on_exception (IRubyObject recv)
static IRubyObject abort_on_exception_set (IRubyObject recv, IRubyObject value)
static RubyThread adopt (IRubyObject recv, Thread t)
static IRubyObject callMethodMissingIfNecessary (ThreadContext context, IRubyObject receiver, DynamicMethod method, String name, IRubyObject[] args, IRubyObject self, CallType callType, Block block)
static RubyClass createObjectClass (Ruby runtime, RubyClass objectClass)
static RubyClass createThreadClass (Ruby runtime)
static IRubyObject critical (IRubyObject receiver)
static IRubyObject critical_set (IRubyObject receiver, RubyBoolean value)
static RubyThread current (IRubyObject recv)
static void initCopy (IRubyObject clone, IRubyObject original)
static RubyArray list (IRubyObject recv)
static RubyThread main (IRubyObject recv)
static RubyThread mainThread (IRubyObject receiver)
static IRubyObject newInstance (IRubyObject recv, IRubyObject[] args, Block block)
static IRubyObject pass (IRubyObject recv)
static void puts (Object obj)
static IRubyObject s_exit (IRubyObject receiver, Block block)
static IRubyObject s_kill (IRubyObject receiver, RubyThread rubyThread, Block block)
static RubyThread start (IRubyObject recv, IRubyObject[] args, Block block)
static IRubyObject stop (IRubyObject receiver)
static String trueFalseNil (String v)
static String trueFalseNil (IRubyObject v)

Public Attributes

Object killLock = new Object()
final ReentrantLock lock = new ReentrantLock()
Object stopLock = new Object()

Static Public Attributes

static final IRubyObject NEVER = new RubyObject()
static final IRubyObject[] NULL_ARRAY = new IRubyObject[0]
static ObjectAllocator OBJECT_ALLOCATOR

Protected Member Functions

void checkFrozen ()
IRubyObject doClone ()
void testFrozen (String message)

Protected Attributes

Map instanceVariables
boolean isTrue = true
RubyClass metaClass

Package Functions

void setThreadGroup (RubyThreadGroup rubyThreadGroup)

Static Package Functions

 [static initializer]

Private Member Functions

boolean abortOnException (Ruby runtime)
void ensureCurrent ()
void ensureNotCurrent ()
IRubyObject getSymbolKey (IRubyObject originalKey)
boolean isCurrent ()
IRubyObject prepareRaiseException (Ruby runtime, IRubyObject[] args, Block block)
 RubyThread (Ruby runtime, RubyClass type)

Static Private Member Functions

static RubyThread adoptThread (final IRubyObject recv, Thread t, Block block)
static RubyThread startThread (final IRubyObject recv, final IRubyObject[] args, boolean callInit, Block block)

Private Attributes

boolean abortOnException
RaiseException exitingException
IRubyObject finalResult
volatile boolean isStopped = false
volatile boolean killed = false
IRubyObject receivedException
RubyThreadGroup threadGroup
ThreadLike threadImpl
Map threadLocalVariables = new HashMap()
ThreadService threadService

Static Private Attributes

static final boolean DEBUG = false
static boolean USE_POOLING

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index