Get id of background task from inside the task

The workaround I’m using now is to create an id, then start the task passing the already created id to the task.

At this point both the function that starts the task and the task itself know the task id, the one I assigned to it.

4 Likes