diff options
author | flow <flowlnlnln@gmail.com> | 2022-12-15 13:45:50 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-12-15 13:45:50 -0300 |
commit | dd578354c448dbb92b12438886d80ac6c0c0bea7 (patch) | |
tree | ceb87046d859456d8e0558c035eaf6b6499af010 /launcher/tasks/ConcurrentTask.h | |
parent | 4f1ea712da46e34a6a1bd75ac68b080bac786462 (diff) | |
download | PrismLauncher-dd578354c448dbb92b12438886d80ac6c0c0bea7.tar.gz PrismLauncher-dd578354c448dbb92b12438886d80ac6c0c0bea7.tar.bz2 PrismLauncher-dd578354c448dbb92b12438886d80ac6c0c0bea7.zip |
feat(Tasks): add ConcurrentTask::clear to allow re-using tasks
This way old runs won't pile up in the internal DSs
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/tasks/ConcurrentTask.h')
-rw-r--r-- | launcher/tasks/ConcurrentTask.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/launcher/tasks/ConcurrentTask.h b/launcher/tasks/ConcurrentTask.h index f1279d32..30b2ae4d 100644 --- a/launcher/tasks/ConcurrentTask.h +++ b/launcher/tasks/ConcurrentTask.h @@ -24,6 +24,11 @@ public: public slots: bool abort() override; + /** Resets the internal state of the task. + * This allows the same task to be re-used. + */ + void clear(); + protected slots: void executeTask() override; |