async_db "fixme" comments

This commit is contained in:
Dmitry Belyaev 2023-08-15 10:36:42 +03:00
parent f1d4cf05c5
commit 07d7ba50cc
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -146,6 +146,8 @@ where
use pin_project::pin_project;
#[pin_project]
/// FIXME: not really async
/// only work when ..push.poll() returns Ready immediately
pub struct WriterSink<'a, T>
where
T: bincode::Encode,
@ -173,7 +175,7 @@ where
let item = this.item.take().unwrap();
let push_fut = this.writer.push(item);
let push_fut = this.writer.push(item); // FIXME:: how to save this future???
pin_mut!(push_fut);
push_fut.poll(ctx)
}
@ -333,6 +335,7 @@ where
return Poll::Ready(None);
}
// FIXME: mayby work only if reader.get().poll() return Ready immediately
let future = self.reader.get(self.index.unwrap());
pin_mut!(future);
match Pin::new(&mut future).poll(cx) {