mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-17 02:12:56 +00:00
review: set channel buffer size to 1
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
This commit is contained in:
@@ -124,7 +124,8 @@ where
|
||||
where
|
||||
B: Buffer<IoBuf = Buf> + Send + 'static,
|
||||
{
|
||||
let (front, back) = duplex::mpsc::channel(2);
|
||||
// It is fine to buffer up to only 1 message. We only 1 message in-flight at a time.
|
||||
let (front, back) = duplex::mpsc::channel(1);
|
||||
|
||||
let join_handle = tokio::spawn(async move {
|
||||
FlushBackgroundTask::new(back, file, gate_guard, ctx)
|
||||
|
||||
Reference in New Issue
Block a user