Skip to content

Commit

Permalink
[collections] Bug Fix: Increasing arbitrary timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
iyzhang committed Oct 30, 2024
1 parent 8c120fd commit ca0352c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/rust/collections/async_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use ::std::{
//======================================================================================================================

// The following value was chosen arbitrarily.
const TIMEOUT_MILLISECONDS: Duration = Duration::from_secs(120);
const TIMEOUT_SECONDS: Duration = Duration::from_secs(1000);

//======================================================================================================================
// Structures
Expand Down Expand Up @@ -72,7 +72,7 @@ impl<T> AsyncQueue<T> {
}
}
};
conditional_yield_with_timeout(wait_condition, timeout.unwrap_or(TIMEOUT_MILLISECONDS)).await
conditional_yield_with_timeout(wait_condition, timeout.unwrap_or(TIMEOUT_SECONDS)).await
}

/// Try to get the head of the queue.
Expand Down
2 changes: 1 addition & 1 deletion src/rust/collections/async_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use ::std::{
//======================================================================================================================

/// Default timeout for an AynscQueue This was chosen arbitrarily.
const TIMEOUT_SECONDS: Duration = Duration::from_secs(120);
const TIMEOUT_SECONDS: Duration = Duration::from_secs(1000);

//======================================================================================================================
// Structures
Expand Down

0 comments on commit ca0352c

Please sign in to comment.