Skip to content

Commit

Permalink
remove biased selects
Browse files Browse the repository at this point in the history
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
  • Loading branch information
blt committed Apr 13, 2023
1 parent 9bdd00a commit afb4910
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.14.0-rc8]
## Changed
- Remove biased select! to avoid failing to shutdown.

## [0.14.0-rc7]
## Changed
- Datadog logs generation now much faster, relying on an experimentally
Expand Down
2 changes: 0 additions & 2 deletions src/generator/file_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ impl Child {
let total_newlines = block.lines;

tokio::select! {
biased;

_ = self.throttle.wait_for(total_bytes) => {
{
fp.write_all(&block.bytes).await?;
Expand Down
2 changes: 0 additions & 2 deletions src/generator/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ impl Tcp {
let total_bytes = blk.total_bytes;

tokio::select! {
biased;

_ = self.throttle.wait_for(total_bytes), if connection.is_some() => {
let mut client: TcpStream = connection.unwrap();
let blk = blocks.next().unwrap(); // actually advance through the blocks
Expand Down
2 changes: 0 additions & 2 deletions src/generator/unix_datagram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ impl Child {
let total_bytes = blk.total_bytes;

tokio::select! {
biased;

_ = self.throttle.wait_for(total_bytes) => {
// NOTE When we write into a unix socket it may be that only
// some of the written bytes make it through in which case we
Expand Down

0 comments on commit afb4910

Please sign in to comment.