mpsc::Receiver::blocking_recv_many
: Blocking variant of recv_many
#6865
Labels
A-tokio
Area: The main tokio crate
C-feature-request
Category: A feature request.
M-sync
Module: tokio/sync
Problem
I'm working on a system where many messages are processed at an FFI boundary, which requires a blocking function call.
Suggested Solution
I would like to receive more than one message if available from a blocking context. Like
Receiver::recv_many
, but in a thread or task spawned byspawn_blocking
.Alternatives
So far, I've been offloading the blocking work via
spawn_blocking
and awaiting the handle. This works but is not ideal.I'd be happy to give this a try.
The text was updated successfully, but these errors were encountered: