Skip to content

Commit afb4910

Browse files
committed
remove biased selects
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
1 parent 9bdd00a commit afb4910

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.14.0-rc8]
10+
## Changed
11+
- Remove biased select! to avoid failing to shutdown.
12+
913
## [0.14.0-rc7]
1014
## Changed
1115
- Datadog logs generation now much faster, relying on an experimentally

src/generator/file_gen.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ impl Child {
243243
let total_newlines = block.lines;
244244

245245
tokio::select! {
246-
biased;
247-
248246
_ = self.throttle.wait_for(total_bytes) => {
249247
{
250248
fp.write_all(&block.bytes).await?;

src/generator/tcp.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ impl Tcp {
149149
let total_bytes = blk.total_bytes;
150150

151151
tokio::select! {
152-
biased;
153-
154152
_ = self.throttle.wait_for(total_bytes), if connection.is_some() => {
155153
let mut client: TcpStream = connection.unwrap();
156154
let blk = blocks.next().unwrap(); // actually advance through the blocks

src/generator/unix_datagram.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ impl Child {
209209
let total_bytes = blk.total_bytes;
210210

211211
tokio::select! {
212-
biased;
213-
214212
_ = self.throttle.wait_for(total_bytes) => {
215213
// NOTE When we write into a unix socket it may be that only
216214
// some of the written bytes make it through in which case we

0 commit comments

Comments
 (0)