### Function

# Vips ThreadpoolWorkFn

#### Declaration

    int
    (* VipsThreadpoolWorkFn) (
      VipsThreadState* state,
      void* a
    )

#### Description [src]

This function is called to process a work unit. Many copies of this can run at once, so it should not write to the per-pool state. It can write to per-thread state.

See also

`vips_threadpool_run()`.

#### Parameters

`state`

  Type: `VipsThreadState`

  Per-thread state.

  The data is owned by the caller of the function.

`a`

  Type: `void*`

  Client data.

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

#### Return value

Type: `int`

0 on success, or -1 on error.