You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::print
at libstd/sys_common/backtrace.rs:71
at libstd/sys_common/backtrace.rs:59
2: std::panicking::default_hook::{{closure}}
at libstd/panicking.rs:211
3: std::panicking::default_hook
at libstd/panicking.rs:227
4: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:475
5: std::panicking::continue_panic_fmt
at libstd/panicking.rs:390
6: rust_begin_unwind
at libstd/panicking.rs:325
7: core::panicking::panic_fmt
at libcore/panicking.rs:77
8: core::option::expect_failed
at libcore/option.rs:989
9: <std::time::Instant as core::ops::arith::Add<core::time::Duration>>::add
at /checkout/src/libcore/option.rs:312
at libstd/sys/unix/time.rs:46
at libstd/sys/unix/time.rs:297
at libstd/time.rs:218
10: <std::sync::mpsc::Receiver<T>>::recv_timeout
at /checkout/src/libstd/sync/mpsc/mod.rs:1300
11: playground::main
at src/main.rs:5
12: std::rt::lang_start::{{closure}}
at /checkout/src/libstd/rt.rs:74
13: std::panicking::try::do_call
at libstd/rt.rs:59
at libstd/panicking.rs:310
14: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
15: std::rt::lang_start_internal
at libstd/panicking.rs:289
at libstd/panic.rs:392
at libstd/rt.rs:58
16: std::rt::lang_start
at /checkout/src/libstd/rt.rs:74
17: main
18: __libc_start_main
19: _start
The text was updated successfully, but these errors were encountered:
Havvy
added
the
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
label
Sep 25, 2018
Eliminate Receiver::recv_timeout panic
Fixes#54552.
This panic is because `recv_timeout` uses `Instant::now() + timeout` internally. This possible panic is not mentioned in the documentation for this method.
Very recently we merged (still unstable) support for checked addition (#56490) of `Instant + Duration`, so it's now finally possible to add these together without risking a panic.
Receiver::recv_timeout() panics with large values of timeout
I tried this code:
I expected a blocking receive.
Instead, this happened:
https://play.rust-lang.org/?gist=4880602aa21f718bd8fa7e4826380218&version=stable&mode=debug&edition=2015
Meta
rustc --version --verbose
Backtrace:
The text was updated successfully, but these errors were encountered: