Task.setSourceTag
void setSourceTag(void * sourceTag = null)Sets task's source tag.
You can use this to tag a task return value with a particular pointer (usually a pointer to the function doing the tagging) and then later check it using [gio.task.Task.getSourceTag] (or [gio.async_result.AsyncResult.isTagged]) in the task's "finish" function, to figure out if the response came from a particular place.
A macro wrapper around this function will automatically set the task’s name to the string form of source_tag if it’s not already set, for convenience.
Parameters
sourceTag | an opaque pointer indicating the source of this task |