We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 303ac90 commit c80915eCopy full SHA for c80915e
tests/stream.rs
@@ -144,12 +144,8 @@ fn flat_map_doesnt_poll_completed_inner_stream() {
144
145
fn poll_next(mut self: Pin<&mut Self>, ctx: &mut Context) -> Poll<Option<Self::Item>> {
146
if self.polled {
147
- let waker = ctx.waker().clone();
148
- std::thread::spawn(move || {
149
- std::thread::sleep(std::time::Duration::from_millis(10));
150
- waker.wake_by_ref();
151
- });
152
self.polled = false;
+ ctx.waker().wake_by_ref();
153
Poll::Pending
154
} else {
155
self.polled = true;
0 commit comments