public class ThreadService extends Object
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(Object threadOrFuture,
RubyThread rubyThread) |
void |
deliverEvent(RubyThread sender,
RubyThread target,
ThreadService.Event event)
Deprecated.
|
void |
disposeCurrentThread() |
void |
dissociateThread(Object threadOrFuture) |
RubyThread[] |
getActiveRubyThreads() |
boolean |
getCritical() |
ThreadContext |
getCurrentContext()
In order to provide an appropriate execution context for a given thread,
we store ThreadContext instances in a threadlocal.
|
RubyThread |
getMainThread() |
boolean |
getPolling() |
ThreadGroup |
getRubyThreadGroup() |
Map<Object,RubyThread> |
getRubyThreadMap()
Get the map from threadlike objects to RubyThread instances.
|
ThreadContext |
getThreadContextForThread(RubyThread thread) |
void |
initMainThread() |
ThreadContext |
registerNewThread(RubyThread thread) |
void |
setCritical(boolean critical) |
void |
setCurrentContext(ThreadContext context) |
void |
setMainThread(Thread thread,
RubyThread rubyThread) |
void |
unregisterThread(RubyThread thread) |
public ThreadService(Ruby runtime)
public void disposeCurrentThread()
public void initMainThread()
public ThreadContext getCurrentContext()
public void setCurrentContext(ThreadContext context)
public RubyThread getMainThread()
public void setMainThread(Thread thread, RubyThread rubyThread)
public boolean getPolling()
public RubyThread[] getActiveRubyThreads()
public ThreadGroup getRubyThreadGroup()
public ThreadContext getThreadContextForThread(RubyThread thread)
public ThreadContext registerNewThread(RubyThread thread)
public void associateThread(Object threadOrFuture, RubyThread rubyThread)
public void dissociateThread(Object threadOrFuture)
public void unregisterThread(RubyThread thread)
public void setCritical(boolean critical)
public boolean getCritical()
public Map<Object,RubyThread> getRubyThreadMap()
@Deprecated public void deliverEvent(RubyThread sender, RubyThread target, ThreadService.Event event)
Copyright © 2001-2016 JRuby. All Rights Reserved.