### Method

# Dex Scheduler spawnv

#### Declaration [src]

    DexFuture*
    dex_scheduler_spawnv (
      DexScheduler* scheduler,
      gsize stack_size,
      GCallback callback,
      guint n_params,
      ...
    )

#### Description [src]

Same as `dex_scheduler_spawn()` but trampolines into a fiber without having to create special structures on the way there.

    static DexFuture *
    fiber_func (GInputStream *stream,
                int           num)
    {
      ...

      return dex_future_new_true ();
    }

    DexFuture *
    spawn_fiber (GInputStream *stream)
    {
      return dex_scheduler_spawnv (NULL, 0,
                                   G_CALLBACK (fiber_func),
                                   2,
                                   G_TYPE_POINTER, stream,
                                   G_TYPE_INT, 42);
    }

This method is not directly available to language bindings.

#### Parameters

`scheduler`

  Type: `DexScheduler`

  A `DexScheduler`.

  The argument can be `NULL`.

`stack_size`

  Type: `gsize`

  Stack size in bytes or 0.

`callback`

  Type: `GCallback`

  The fiber to spawn.

`n_params`

  Type: `guint`

  Number of arguments of the fiber.

`...`

  Type: ``

  Arguments, pairs of `GType` followed by the value.

#### Return value

Type: `DexFuture`

A `DexFuture` that will resolve or reject when `callback` completes (or its resulting `DexFuture` completes).

The caller of the method takes ownership of the returned data, and is responsible for freeing it.