1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-07-30 11:48:31 +00:00

offload initial iterator seeks to threadpool

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-12-02 08:51:59 +00:00
parent 320b0680bd
commit b5006a4c41
20 changed files with 361 additions and 131 deletions

View file

@ -2,7 +2,7 @@ use conduit::{implement, Result};
use futures::{Stream, StreamExt};
use serde::Deserialize;
use crate::{keyval, keyval::Key, stream};
use crate::{keyval, keyval::Key, stream, stream::Cursor};
#[implement(super::Map)]
pub fn rev_keys<'a, K>(&'a self) -> impl Stream<Item = Result<Key<'_, K>>> + Send
@ -16,5 +16,5 @@ where
#[tracing::instrument(skip(self), fields(%self), level = "trace")]
pub fn rev_raw_keys(&self) -> impl Stream<Item = Result<Key<'_>>> + Send {
let opts = super::read_options_default();
stream::KeysRev::new(&self.db, &self.cf, opts, None)
stream::KeysRev::new(&self.db, &self.cf, opts).init(None)
}