Package chemaxon.marvin.view
Interface TaskScheduler
Generic task scheduler interface.
- Since:
- Marvin 5.2, 02/24/2009
-
Method Summary
Modifier and TypeMethodDescriptionvoidinvokeAndWait(Runnable runnable) Enqueues a task on the scheduler's thread and waits for its completion.voidinvokeLater(Runnable task, int priority) Enqueues a task on the scheduler's thread.voidWaits for all tasks to finish.
-
Method Details
-
invokeLater
Enqueues a task on the scheduler's thread.- Parameters:
task- the taskpriority- lower number means higher priority- See Also:
-
invokeAndWait
Enqueues a task on the scheduler's thread and waits for its completion. The task is scheduled with zero priority.- Parameters:
runnable- the task- Throws:
InterruptedException- if another thread has interrupted the task threadInvocationTargetException- if an throwable is thrown when runningrunnable- See Also:
-
waitForAll
Waits for all tasks to finish.- Throws:
InterruptedException- if another thread has interrupted the task thread- See Also:
-