Function

IdeTaskCacheCallback

Declaration

void
(* IdeTaskCacheCallback) (
  IdeTaskCache* self,
  gconstpointer key,
  GTask* task,
  gpointer user_data
)

Description

IdeTaskCacheCallback is the prototype for a function to be executed to populate an item in the cache.

This function will be executed when a fault (cache miss) occurs from a caller requesting an item from the cache.

The callee may complete the operation asynchronously, but MUST return either a GObject using g_task_return_pointer() or a GError using g_task_return_error() or g_task_return_new_error().

Parameters

self

Type: IdeTaskCache

An IdeTaskCache.

The data is owned by the caller of the function.
key

Type: gconstpointer

The key to fetch.

The argument can be NULL.
The data is owned by the caller of the function.
task

Type: GTask

The task to be completed.

The data is owned by the caller of the function.
user_data

Type: gpointer

User_data registered at initialization.

The argument can be NULL.
The data is owned by the caller of the function.