Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/libstd/sync/mpsc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,34 @@ impl<T> Receiver<T> {
/// [`SyncSender`]: struct.SyncSender.html
/// [`Err`]: ../../../std/result/enum.Result.html#variant.Err
///
/// # Known Issues
///
/// There is currently a known issue (see [`#39364`]) that causes `recv_timeout`
/// to panic unexpectedly with the following example:
///
/// ```no_run
/// use std::sync::mpsc::channel;
/// use std::thread;
/// use std::time::Duration;
///
/// let (tx, rx) = channel::<String>();
///
/// thread::spawn(move || {
/// let d = Duration::from_millis(10);
/// loop {
/// println!("recv");
/// let _r = rx.recv_timeout(d);
/// }
/// });
///
/// thread::sleep(Duration::from_millis(100));
/// let _c1 = tx.clone();
///
/// thread::sleep(Duration::from_secs(1));
/// ```
///
/// [`#39364`]: https://github.com/rust-lang/rust/issues/39364
///
/// # Examples
///
/// Successfully receiving value before encountering timeout:
Expand Down