risingwave_batch::task::channel

Trait ChanSender

source
pub(super) trait ChanSender: Send {
    // Required methods
    async fn send(&mut self, chunk: DataChunk) -> Result<()>;
    async fn close(self, error: Option<Arc<BatchError>>) -> Result<()>;
}

Required Methods§

source

async fn send(&mut self, chunk: DataChunk) -> Result<()>

This function will block until there’s enough resource to process the chunk. Currently, it will only be called from single thread. None is sent as a mark of the ending of channel.

source

async fn close(self, error: Option<Arc<BatchError>>) -> Result<()>

Close this data channel.

If finished correctly, we should pass None, otherwise we should pass BatchError. In either case we should stop sending more data.

Object Safety§

This trait is not object safe.

Implementors§