Worker and WorkerTasks

2 messages - 1357 views
I'm trying to use the Worker and WorkerTask to run background tasks on my application. When I call Worker.instance.stop() do the pushed tasks get automatically removed ? So am I doing it right if in my KuixMIDlet I push a task and start the worker in my onStarted method and when onPause gets called I stop the worker and in onResumed I push the task again and start the worker ? At least it seems that only one task gets pushed when doing things like this.
Hi, Actualy, all tasks are removed when the worker is stopped. It's right it is not necessary the best way because KuixMIDlet already stop and resume the worker if the app is paused. In the next kutil release this will be fix by adding a new method removeAllTasks() to the worker and kept the tasks list while invoking the stop method.