|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.internal.runtime.FutureThread
public class FutureThread
Field Summary | |
---|---|
RubyThread |
rubyThread
|
Constructor Summary | |
---|---|
FutureThread(RubyThread rubyThread,
RubyRunnable runnable)
|
Method Summary | |
---|---|
int |
getPriority()
Jobs from the thread pool do not support setting priorities. |
void |
interrupt()
In order to do a thread interrupt, we need to get the actual thread, stored in the RubyRunnable instance and tell it to interrupt. |
boolean |
isAlive()
If the future has not yet run and or is running and not yet complete. |
boolean |
isCurrent()
|
boolean |
isInterrupted()
|
void |
join()
|
void |
join(long millis)
We check for zero millis here because Future appears to wait for zero if you pass it zero, where Thread behavior is to wait forever. |
void |
setPriority(int priority)
|
void |
start()
Starting a new thread in terms of a thread pool is just submitting it as a job to the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public RubyThread rubyThread
Constructor Detail |
---|
public FutureThread(RubyThread rubyThread, RubyRunnable runnable)
Method Detail |
---|
public void start()
start
in interface ThreadLike
public void interrupt()
interrupt
in interface ThreadLike
public boolean isAlive()
isAlive
in interface ThreadLike
public void join() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
join
in interface ThreadLike
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public void join(long millis) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
join
in interface ThreadLike
millis
- The number of millis to wait; 0 waits forever.
java.lang.InterruptedException
- If the blocking join is interrupted
by another thread.
java.util.concurrent.ExecutionException
- If an execution error is
raised by the underlying Future.public int getPriority()
getPriority
in interface ThreadLike
public void setPriority(int priority)
setPriority
in interface ThreadLike
public boolean isCurrent()
isCurrent
in interface ThreadLike
public boolean isInterrupted()
isInterrupted
in interface ThreadLike
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |