### Function

# Vips thread_execute

#### Declaration [src]

    int
    vips_thread_execute (
      const char* domain,
      GFunc func,
      gpointer data
    )

#### Description [src]

A newly created or reused thread will execute `func` with the argument `data`.

#### Parameters

`domain`

  Type: `const char*`

  A name for the thread (useful for debugging).

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`func`

  Type: `GFunc`

  A function to execute in the libvips threadset.

`data`

  Type: `gpointer`

  An argument to supply to `func`.

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

#### Return value

Type: `int`

0 on success, -1 on error.