queue_task


Description:

[ Version ( since = "3.12" ) ]
public void queue_task (Task task, TaskThreadFunc task_func)

Adds task to a queue of waiting tasks with the same source object.

Queued tasks execute one at a time in the order they were added. When task reaches the front of the queue, it will be dispatched by invoking task_func in a separate thread. If task is cancelled while queued, it will complete immediately with an appropriate error.

This is primarily intended for use by Store, Transport and Folder to achieve ordered invocation of synchronous class methods.

Parameters:

this

a Service

task

a Task

task_func

function to call when task is dispatched