From 23d1615b6a22187e76f281a1ad84515e072ccab9 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Mon, 26 Aug 2024 10:58:09 +0300 Subject: [PATCH] buffer 16 messages in copy-both involved channels --- tokio-postgres/src/client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tokio-postgres/src/client.rs b/tokio-postgres/src/client.rs index e1d78460..eab65d30 100644 --- a/tokio-postgres/src/client.rs +++ b/tokio-postgres/src/client.rs @@ -123,9 +123,9 @@ impl InnerClient { } pub fn start_copy_both(&self) -> Result { - let (sender, receiver) = mpsc::channel(1); - let (stream_sender, stream_receiver) = mpsc::channel(0); - let (sink_sender, sink_receiver) = mpsc::channel(0); + let (sender, receiver) = mpsc::channel(16); + let (stream_sender, stream_receiver) = mpsc::channel(16); + let (sink_sender, sink_receiver) = mpsc::channel(16); let responses = Responses { receiver,