cancel
you can terminate a timer and it's associated thread. All tasks which are scheduled to run after this point are cancelled. Tasks are executed sequentially but are subject to the delays from other tasks run methods. If a specific task takes an excessive amount of time to run it may impact the time at which subsequent tasks may run. The Timer task does not offer any guarantees about the real-time nature of scheduling tasks as it's underlying implementation relies on the Object.wait(long)
method.
Multiple threads can share a single Timer without the need for their own synchronization. @see TimerTask @see java.lang.Object#wait(long)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|