public class ThreadService extends java.lang.ThreadLocal<java.lang.ref.SoftReference<ThreadContext>>
Modifier and Type | Class and Description |
---|---|
static class |
ThreadService.Event
Deprecated.
|
Constructor and Description |
---|
ThreadService(Ruby runtime) |
Modifier and Type | Method and Description |
---|---|
void |
associateThread(java.lang.Thread thread,
RubyThread rubyThread) |
void |
deliverEvent(RubyThread sender,
RubyThread target,
ThreadService.Event event)
Deprecated.
|
void |
disposeCurrentThread()
Deprecated.
|
void |
dissociateThread(java.lang.Object threadOrFuture)
Deprecated.
|
RubyThread[] |
getActiveRubyThreads() |
boolean |
getCritical()
Deprecated.
|
ThreadContext |
getCurrentContext()
In order to provide an appropriate execution context for a given thread,
we store ThreadContext instances in a threadlocal.
|
static ThreadContext |
getCurrentContext(ThreadService service) |
RubyThread |
getMainThread() |
boolean |
getPolling()
Deprecated.
|
java.lang.ThreadGroup |
getRubyThreadGroup()
Deprecated.
|
java.util.Map<java.lang.Object,RubyThread> |
getRubyThreadMap()
Deprecated.
|
ThreadContext |
getThreadContextForThread(RubyThread thread)
Deprecated.
|
long |
incrementAndGetThreadCount() |
void |
initMainThread() |
ThreadContext |
registerNewThread(RubyThread thread) |
void |
setCritical(boolean critical)
Deprecated.
|
void |
setCurrentContext(ThreadContext context)
Deprecated.
|
void |
setMainThread(java.lang.Thread thread,
RubyThread rubyThread) |
void |
teardown() |
void |
unregisterCurrentThread(ThreadContext context) |
void |
unregisterThread(RubyThread thread) |
public ThreadService(Ruby runtime)
public void teardown()
public void initMainThread()
public final ThreadContext getCurrentContext()
public static ThreadContext getCurrentContext(ThreadService service)
public ThreadContext registerNewThread(RubyThread thread)
public RubyThread getMainThread()
public void setMainThread(java.lang.Thread thread, RubyThread rubyThread)
public RubyThread[] getActiveRubyThreads()
public void associateThread(java.lang.Thread thread, RubyThread rubyThread)
public void unregisterThread(RubyThread thread)
public void unregisterCurrentThread(ThreadContext context)
@Deprecated public void disposeCurrentThread()
public long incrementAndGetThreadCount()
@Deprecated public java.util.Map<java.lang.Object,RubyThread> getRubyThreadMap()
@Deprecated public void deliverEvent(RubyThread sender, RubyThread target, ThreadService.Event event)
@Deprecated public java.lang.ThreadGroup getRubyThreadGroup()
@Deprecated public ThreadContext getThreadContextForThread(RubyThread thread)
@Deprecated public void dissociateThread(java.lang.Object threadOrFuture)
@Deprecated public final void setCurrentContext(ThreadContext context)
@Deprecated public boolean getPolling()
@Deprecated public void setCritical(boolean critical)
@Deprecated public boolean getCritical()
Copyright © 2001-2020 JRuby. All Rights Reserved.