File tree 1 file changed +23
-1
lines changed
1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -1249,7 +1249,29 @@ impl<T> Receiver<T> {
1249
1249
///
1250
1250
/// # Panics
1251
1251
///
1252
- /// Panics due to a known issue ([`#39364`][]).
1252
+ /// There is currently a known issue with this function ([`#39364`]) that
1253
+ /// causes `recv_timeout` to panic unexpectedly with the following example:
1254
+ ///
1255
+ /// ```no_run
1256
+ /// use std::sync::mpsc::channel;
1257
+ /// use std::thread;
1258
+ /// use std::time::Duration;
1259
+ ///
1260
+ /// let (tx, rx) = channel::<String>();
1261
+ ///
1262
+ /// thread::spawn(move || {
1263
+ /// let d = Duration::from_millis(10);
1264
+ /// loop {
1265
+ /// println!("recv");
1266
+ /// let _r = rx.recv_timeout(d);
1267
+ /// }
1268
+ /// });
1269
+ ///
1270
+ /// thread::sleep(Duration::from_millis(100));
1271
+ /// let _c1 = tx.clone();
1272
+ ///
1273
+ /// thread::sleep(Duration::from_secs(1));
1274
+ /// ```
1253
1275
///
1254
1276
/// [`#39364`]: https://github.com/rust-lang/rust/issues/39364
1255
1277
///
You can’t perform that action at this time.
0 commit comments