Replies: 2 comments
-
|
Here is what could be changed: hurlebouc@7b69d2a |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I recently hit something like this, and eventually realized you could just call Box::pin(TimeoutBody::new(
Duration::from_secs(30),
req.into_body(),
))) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Currently
TimeoutBodydepends ontokio::time::Sleepwhich is!Unpin. This result isTimeoutBodynotUnpineither.This situation may be problematic, for instance, when using a
TimeoutBodyas anAsyncBufRead(thanks totokio_util::io::stream_reader::StreamReaderfor instance) since majority of functions (likeread_linefor instance) ask for anUnpinstream.It is not difficulte to make
StreamReaderUnpin by replacingSleepbyPin<Box<Sleep>>. What do you thing about this change?Beta Was this translation helpful? Give feedback.
All reactions