Method

CamelServicequeue_task

since: 3.12

Declaration [src]

void
camel_service_queue_task (
  CamelService* service,
  GTask* task,
  GTaskThreadFunc task_func
)

Description [src]

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 CamelStore, CamelTransport and CamelFolder to achieve ordered invocation of synchronous class methods.

Available since: 3.12

Parameters

task

Type: GTask

A GTask.

The data is owned by the caller of the method.
task_func

Type: GTaskThreadFunc

Function to call when task is dispatched.