Dex.Channel.receive_all

### Method

# Dex Channelreceive_all

#### Declaration [src]

    DexFuture*
    dex_channel_receive_all (
      DexChannel* channel
    )

#### Description [src]

Will attempt to receive all items in the channel as a `DexFutureSet`.

If the receive side of the channel is closed, then the future will reject with an error.

If there are items in the queue, then they will be returned as part of a `DexFutureSet` containing each of the futures.

Otherwise, a `DexFutureSet` will be returned which will resolve or reject when the next item is available in the channel (or the send or receive sides are closed).

#### Return value

Type: `DexFuture`

A `DexFuture`.

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