Missing clarity in TimerTask doc
Ulf.Zibis at CoSoCo.de
Mon Sep 15 22:11:16 UTC 2014
Am 15.09.2014 um 22:39 schrieb Martin Buchholz:
> IllegalStateException - if task was already scheduled or cancelled, timer was cancelled, or timer
> thread terminated.
Oops, overseen, thanks!
Maybe it could be extentend to:
IllegalStateException - if task was already scheduled, cancelled or already done, timer was
cancelled, or timer thread terminated.
... as I assume a TimerTask instance is never reusable.
Is there a reason why a TimerTask is not reset for reuse when cancelled or already done?
> On Mon, Sep 15, 2014 at 10:47 AM, Ulf Zibis <Ulf.Zibis at cosoco.de <mailto:Ulf.Zibis at cosoco.de>> wrote:
> Hi all,
> I'm missing clarity, if a j.u.TimerTask object can be scheduled more than once.
> Especially, can it be scheduled again with Timer.schedule(...) after it has been cancelled, or
> has a new TimerTask object to be instantiated?
> What happens if a TimerTask is scheduled again before the first schedule had happened; would
> it then happen twice or would the same run be re-scheduled?
More information about the core-libs-dev