We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d75aae2 commit 4cb1fafCopy full SHA for 4cb1faf
src/task/blocking.rs
@@ -38,9 +38,14 @@ lazy_static! {
38
.expect("cannot start a thread driving blocking tasks");
39
}
40
41
- // We want to bound the work queue to make it more
42
- // suitable as a backpressure mechanism.
43
- let (sender, receiver) = bounded(MAX_THREADS as usize);
+ // We want to use an unbuffered channel here to help
+ // us drive our dynamic control. In effect, the
+ // kernel's scheduler becomes the queue, reducing
44
+ // the number of buffers that work must flow through
45
+ // before being acted on by a core. This helps keep
46
+ // latency snappy in the overall async system by
47
+ // reducing bufferbloat.
48
+ let (sender, receiver) = bounded(0);
49
Pool { sender, receiver }
50
};
51
0 commit comments