aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-02-15 11:04:10 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-02-15 11:04:10 +0100
commit0bb7cdf696190200d1885ec822518ac45b685a9b (patch)
tree8d7ec87dbf8f6c77b194841e106ba29188a1388a /src
parentd50b1dc178702f112b34e277465e61b2c3cd0a41 (diff)
downloadaerogramme-0bb7cdf696190200d1885ec822518ac45b685a9b.tar.gz
aerogramme-0bb7cdf696190200d1885ec822518ac45b685a9b.zip
Set pipelinable commands to 64
Diffstat (limited to 'src')
-rw-r--r--src/imap/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/imap/mod.rs b/src/imap/mod.rs
index 6f143d7..58c4dc0 100644
--- a/src/imap/mod.rs
+++ b/src/imap/mod.rs
@@ -142,6 +142,8 @@ use tokio::sync::mpsc::*;
use tokio::sync::Notify;
use tokio_util::bytes::BytesMut;
+const PIPELINABLE_COMMANDS: usize = 64;
+
#[derive(Debug)]
enum LoopMode {
Quit,
@@ -201,7 +203,7 @@ impl NetLoop {
.await?;
// Start a mailbox session in background
- let (cmd_tx, cmd_rx) = mpsc::channel::<Request>(3);
+ let (cmd_tx, cmd_rx) = mpsc::channel::<Request>(PIPELINABLE_COMMANDS);
let (resp_tx, resp_rx) = mpsc::unbounded_channel::<ResponseOrIdle>();
tokio::spawn(Self::session(ctx.clone(), cmd_rx, resp_tx));