-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
When Receiver::recv_timeout receives certain large values, it returns immediately. This is probably due to an overflowing value. Instead, when there is overflow, it should fall back to Receiver::recv.
use std::sync::mpsc::Receiver;
use std::time::Duration;
let max = Duration::from_secs(u64::max_value());
receiver.recv_timeout(max);
Instant should probably not overflow like this:
let now = Instant::now();
let end_of_time = Instant::now() + Duration::from_secs(u64::max_value());
println!("{:?}", now);
println!("{:?}", end_of_time);
println!("did we pass end of time? {}", now > end_of_time);
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.