mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 11:06:50 +01:00
prevent re-schedule of cancelled TimerTask
This commit is contained in:
@@ -154,7 +154,8 @@ public:
|
||||
|
||||
protected:
|
||||
void run();
|
||||
|
||||
static void validateTask(const TimerTask::Ptr& pTask);
|
||||
|
||||
private:
|
||||
Timer(const Timer&);
|
||||
Timer& operator = (const Timer&);
|
||||
|
||||
@@ -50,7 +50,10 @@ public:
|
||||
/// not yet run, or has not yet been scheduled, it will never run.
|
||||
/// If the task has been scheduled for repeated execution, it will never
|
||||
/// run again. If the task is running when this call occurs, the task
|
||||
/// will run to completion, but will never run again.
|
||||
/// will run to completion, but will never run again.
|
||||
///
|
||||
/// Warning: A TimerTask that has been cancelled must not be scheduled again.
|
||||
/// An attempt to do so results in a Poco::Util::IllegalStateException being thrown.
|
||||
|
||||
bool isCancelled() const;
|
||||
/// Returns true iff the TimerTask has been cancelled by a call
|
||||
|
||||
Reference in New Issue
Block a user