async_db "fixme" comments
This commit is contained in:
parent
f1d4cf05c5
commit
07d7ba50cc
@ -146,6 +146,8 @@ where
|
|||||||
use pin_project::pin_project;
|
use pin_project::pin_project;
|
||||||
|
|
||||||
#[pin_project]
|
#[pin_project]
|
||||||
|
/// FIXME: not really async
|
||||||
|
/// only work when ..push.poll() returns Ready immediately
|
||||||
pub struct WriterSink<'a, T>
|
pub struct WriterSink<'a, T>
|
||||||
where
|
where
|
||||||
T: bincode::Encode,
|
T: bincode::Encode,
|
||||||
@ -173,7 +175,7 @@ where
|
|||||||
|
|
||||||
let item = this.item.take().unwrap();
|
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);
|
pin_mut!(push_fut);
|
||||||
push_fut.poll(ctx)
|
push_fut.poll(ctx)
|
||||||
}
|
}
|
||||||
@ -333,6 +335,7 @@ where
|
|||||||
return Poll::Ready(None);
|
return Poll::Ready(None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: mayby work only if reader.get().poll() return Ready immediately
|
||||||
let future = self.reader.get(self.index.unwrap());
|
let future = self.reader.get(self.index.unwrap());
|
||||||
pin_mut!(future);
|
pin_mut!(future);
|
||||||
match Pin::new(&mut future).poll(cx) {
|
match Pin::new(&mut future).poll(cx) {
|
||||||
|
Loading…
Reference in New Issue
Block a user