### Constructor

# Dex Channel new

#### Declaration [src]

    DexChannel*
    dex_channel_new (
      guint capacity
    )

#### Description [src]

Creates a new `DexChannel`.

If capacity is non-zero, it can be used to limit the size of the channel so that functions can asynchronously stall until items have been removed from the channel. This is useful in buffering situations so that the producer does not outpace the consumer.

#### Parameters

`capacity`

  Type: `guint`

  The channel queue depth or 0 for unlimited.

#### Return value

Type: `DexChannel`

A new `DexChannel`.

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