add async feature #1

Merged
b4tman merged 62 commits from async into master 2023-08-18 06:29:46 +00:00
14 changed files with 2492 additions and 325 deletions
Showing only changes of commit f1d4cf05c5 - Show all commits

@@ -173,19 +173,9 @@ where
let item = this.item.take().unwrap(); let item = this.item.take().unwrap();
let fut = this.writer.push(item); let push_fut = this.writer.push(item);
pin_mut!(fut); pin_mut!(push_fut);
match fut.poll(ctx) { push_fut.poll(ctx)
Poll::Ready(Ok(_)) => {
*this.item = None;
Poll::Ready(Ok(()))
}
Poll::Ready(Err(e)) => {
*this.item = None;
Poll::Ready(Err(e))
}
Poll::Pending => Poll::Pending,
}
} }
fn start_send(self: std::pin::Pin<&mut Self>, item: T) -> Result<(), Self::Error> { fn start_send(self: std::pin::Pin<&mut Self>, item: T) -> Result<(), Self::Error> {