File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
main/java/com/iluwatar/threadpool
test/java/com/iluwatar/threadpool Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1313 * more tasks than threads. As soon as a thread completes its task, it will request the next
1414 * task from the queue until all tasks have been completed. The thread can then terminate, or
1515 * sleep until there are new tasks available.
16- *
16+ * <p>
1717 * In this example we create a list of tasks presenting work to be done. Each task is then
18- * wrapped into a Worker object that implements Runnable. We create an ExecutorService with
19- * fixed number of threads (Thread Pool) and use them to execute the Workers.
18+ * wrapped into a {@link Worker} object that implements {@link Runnable}. We create an
19+ * {@link ExecutorService} with fixed number of threads (Thread Pool) and use them to execute
20+ * the {@link Worker}s.
2021 *
2122 */
2223public class App {
2324
25+ /**
26+ * Program entry point
27+ * @param args command line args
28+ */
2429 public static void main ( String [] args ) {
2530
2631 System .out .println ("Program started" );
Original file line number Diff line number Diff line change 22
33/**
44 *
5- * Worker implements Runnable and thus can be executed by ExecutorService
5+ * Worker implements {@link Runnable} and thus can be executed by {@link ExecutorService}
66 *
77 */
88public class Worker implements Runnable {
Original file line number Diff line number Diff line change 44
55import com .iluwatar .threadpool .App ;
66
7+ /**
8+ * Application test
9+ * @author ilkka
10+ *
11+ */
712public class AppTest {
813
914 @ Test
You can’t perform that action at this time.
0 commit comments