Skip to content

Commit 78c1222

Browse files
authored
Merge pull request #33 from petrosagg/bigger-channels
tokio-postgres: increase size of client<->connection channels
2 parents 6d48e0e + 1a52ef2 commit 78c1222

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tokio-postgres/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub struct InnerClient {
113113

114114
impl InnerClient {
115115
pub fn send(&self, messages: RequestMessages) -> Result<Responses, Error> {
116-
let (sender, receiver) = mpsc::channel(1);
116+
let (sender, receiver) = mpsc::channel(1024);
117117
let request = Request { messages, sender };
118118
self.sender
119119
.unbounded_send(request)

tokio-postgres/src/copy_in.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ async fn start<T>(client: &InnerClient, buf: Bytes, simple: bool) -> Result<Copy
192192
where
193193
T: Buf + 'static + Send,
194194
{
195-
let (mut sender, receiver) = mpsc::channel(1);
195+
let (mut sender, receiver) = mpsc::channel(1024);
196196
let receiver = CopyInReceiver::new(receiver);
197197
let mut responses = client.send(RequestMessages::CopyIn(receiver))?;
198198

0 commit comments

Comments
 (0)