Register / Login  |  Desktop view  |  Jump to bottom of page

IoAbstraction & TaskManagerIO » Pause task

Author: loczi1
17/03/2022 09:16:56
I have several tasks shceduled running fine, thanks for the TaskManager.
I have to execute once a long time consuming task (syncing large amount af data from the web).
Other task should wait until this is not done.
Can I somehow set the already sheduled task to do not execute at the scheduled time based the taskid_t?
Other solution would be cancelling the tasks of course..

Thanks!

Author: davetcc
17/03/2022 12:52:23
Only one task will ever run at once anyway, once the long running task starts, unless you called yieldForMicros(..) nothing else would run.

However, you can suspend tasks using the following on the task manager object:

void setTaskEnabled(taskid_t task, bool ena);

Author: loczi1
20/03/2022 19:52:23
Cheers Dave!




Register / Login  |  Desktop view  |  Jump to top of page