Skip to content

Commit

Permalink
bigger worker queue
Browse files Browse the repository at this point in the history
  • Loading branch information
brokad committed Nov 1, 2022
1 parent 9d0b1bb commit 4d9d003
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gateway/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use tracing::{debug, info};
use crate::task::{BoxedTask, TaskResult};
use crate::Error;

const WORKER_QUEUE_SIZE: usize = 2048;

pub struct Worker<W = BoxedTask> {
send: Option<Sender<W>>,
recv: Receiver<W>,
Expand All @@ -23,7 +25,7 @@ where
W: Send,
{
pub fn new() -> Self {
let (send, recv) = channel(256);
let (send, recv) = channel(WORKER_QUEUE_SIZE);
Self {
send: Some(send),
recv,
Expand Down

0 comments on commit 4d9d003

Please sign in to comment.