risingwave_stream::executor::actor

Function spawn_blocking_drop_stream

source
pub async fn spawn_blocking_drop_stream<T: Send + 'static>(stream: T)
Expand description

Drop the stream in a blocking task to avoid interfering with other actors.

Logically the actor is dropped after we send the barrier with Drop mutation to the downstream, thus making the drop‘s progress asynchronous. However, there might be a considerable amount of data in the executors’ in-memory cache, dropping these structures might be a CPU-intensive task. This may lead to the runtime being unable to schedule other actors if the drop is called on the current thread.