Home | History | Annotate | Download | only in jsr166

Lines Matching refs:TASKS

188      * scheduleAtFixedRate executes series of tasks at given rate
206 * scheduleWithFixedDelay executes series of tasks with given period
353 * when tasks complete
445 * getTaskCount increases, but doesn't overestimate, when tasks
452 TASKS = 5;
455 for (int i = 0; i < TASKS; i++)
462 assertEquals(TASKS, p.getTaskCount());
570 * getQueue returns the work queue, which contains queued tasks
577 ScheduledFuture[] tasks = new ScheduledFuture[5];
578 for (int i = 0; i < tasks.length; i++) {
584 tasks[i] = p.schedule(r, 1, MILLISECONDS);
588 assertTrue(q.contains(tasks[tasks.length - 1]));
589 assertFalse(q.contains(tasks[0]));
601 ScheduledFuture[] tasks = new ScheduledFuture[5];
605 for (int i = 0; i < tasks.length; i++) {
611 tasks[i] = p.schedule(r, 1, MILLISECONDS);
615 assertFalse(p.remove((Runnable)tasks[0]));
616 assertTrue(q.contains((Runnable)tasks[4]));
617 assertTrue(q.contains((Runnable)tasks[3]));
618 assertTrue(p.remove((Runnable)tasks[4]));
619 assertFalse(p.remove((Runnable)tasks[4]));
620 assertFalse(q.contains((Runnable)tasks[4]));
621 assertTrue(q.contains((Runnable)tasks[3]));
622 assertTrue(p.remove((Runnable)tasks[3]));
623 assertFalse(q.contains((Runnable)tasks[3]));
631 * purge removes cancelled tasks from the queue
635 ScheduledFuture[] tasks = new ScheduledFuture[5];
636 for (int i = 0; i < tasks.length; i++)
637 tasks[i] = p.schedule(new SmallPossiblyInterruptedRunnable(),
640 int max = tasks.length;
641 if (tasks[4].cancel(true)) --max;
642 if (tasks[3].cancel(true)) --max;
652 fail("Purge failed to remove cancelled tasks");
654 for (ScheduledFuture task : tasks)
661 * shutdownNow returns a list containing tasks that were not run
681 * tasks at shutdown
688 ScheduledFuture[] tasks = new ScheduledFuture[5];
689 for (int i = 0; i < tasks.length; i++)
690 tasks[i] = p.schedule(new NoOpRunnable(),
694 for (ScheduledFuture task : tasks) {
702 for (ScheduledFuture task : tasks) {
710 * delayed tasks are cancelled at shutdown
717 ScheduledFuture[] tasks = new ScheduledFuture[5];
718 for (int i = 0; i < tasks.length; i++)
719 tasks[i] = p.schedule(new NoOpRunnable(),
722 assertEquals(tasks.length, q.size());
728 for (ScheduledFuture task : tasks) {
736 * periodic tasks are cancelled at shutdown
759 * periodic tasks are not cancelled at shutdown
979 * invokeAll(c) returns results of all completed tasks
1173 * timed invokeAll(c) returns results of all completed tasks
1192 * timed invokeAll(c) cancels tasks not completed by timeout