Still issues around sending the future across threads, I think. Also had to use the tokio::sync::Mutex in order to hold the lock across the await, but I'm not sure that this is the correct pattern we should follow, as it may still result in a deadlock if we never receive a new batch from next.
Still issues around
sending
the future across threads, I think. Also had to use thetokio::sync::Mutex
in order to hold the lock across theawait
, but I'm not sure that this is the correct pattern we should follow, as it may still result in a deadlock if we never receive a new batch fromnext
.