3131
3232package org .scijava .thread ;
3333
34-
3534import java .lang .reflect .InvocationTargetException ;
3635import java .util .concurrent .Callable ;
3736import java .util .concurrent .Future ;
4241
4342/**
4443 * Interface for the thread handling service.
45- *
44+ *
4645 * @author Curtis Rueden
4746 */
4847public interface ThreadService extends SciJavaService , ThreadFactory {
@@ -72,7 +71,7 @@ public enum ThreadContext {
7271 * thread service. Typically this means that the service allocates a thread
7372 * from its pool, but ultimately the behavior is implementation-dependent.
7473 * This method returns immediately.
75- *
74+ *
7675 * @param code The code to execute.
7776 * @return A {@link Future} that will contain the result once the execution
7877 * has finished. Call {@link Future#get()} to access to the return
@@ -85,7 +84,7 @@ public enum ThreadContext {
8584 * thread service. Typically this means that the service allocates a thread
8685 * from its pool, but ultimately the behavior is implementation-dependent.
8786 * This method returns immediately.
88- *
87+ *
8988 * @param code The code to execute.
9089 * @return A {@link Future} that can be used to block until the execution has
9190 * finished. Call {@link Future#get()} to do so.
@@ -100,7 +99,7 @@ public enum ThreadContext {
10099 * typically the AWT Event Dispatch Thread (EDT). However, ultimately the
101100 * behavior is implementation-dependent.
102101 * </p>
103- *
102+ *
104103 * @return True iff the current thread is considered a dispatch thread.
105104 */
106105 boolean isDispatchThread ();
@@ -113,7 +112,7 @@ public enum ThreadContext {
113112 * typically the AWT Event Dispatch Thread (EDT). However, ultimately the
114113 * behavior is implementation-dependent.
115114 * </p>
116- *
115+ *
117116 * @param code The code to execute.
118117 * @throws InterruptedException If the code execution is interrupted.
119118 * @throws InvocationTargetException If an uncaught exception occurs in the
@@ -129,7 +128,7 @@ void invoke(Runnable code) throws InterruptedException,
129128 * typically the AWT Event Dispatch Thread (EDT). However, ultimately the
130129 * behavior is implementation-dependent.
131130 * </p>
132- *
131+ *
133132 * @param code The code to execute.
134133 */
135134 void queue (Runnable code );
@@ -139,9 +138,10 @@ void invoke(Runnable code) throws InterruptedException,
139138 * <p>
140139 * This works only on threads which the thread service knows about, of course.
141140 * </p>
142- *
141+ *
143142 * @param thread the managed thread, null refers to the current thread
144- * @return the thread that asked the {@link ThreadService} to spawn the specified thread
143+ * @return the thread that asked the {@link ThreadService} to spawn the
144+ * specified thread
145145 */
146146 Thread getParent (Thread thread );
147147
0 commit comments