Skip to content

Commit cd461cf

Browse files
committed
chore: declare public api
1 parent 05be652 commit cd461cf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

rust/cubestore/cubestore/src/metastore/rocks_store.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,13 @@ impl RocksStoreRWLoop {
843843
}
844844
}
845845

846+
pub async fn send<F>(&self, fun: F) -> Result<(), CubeError>
847+
where
848+
F: FnOnce() -> Result<(), CubeError> + Send + 'static,
849+
{
850+
self.tx.send(fun).await.into()
851+
}
852+
846853
pub fn get_name(&self) -> &'static str {
847854
self.name
848855
}
@@ -1034,7 +1041,6 @@ impl RocksStore {
10341041
let (tx, rx) = oneshot::channel::<Result<(R, Vec<MetaStoreEvent>), CubeError>>();
10351042

10361043
let res = rw_loop
1037-
.tx
10381044
.send(Box::new(move || {
10391045
let db_span = warn_long(&span_name, Duration::from_millis(100));
10401046

@@ -1367,7 +1373,7 @@ impl RocksStore {
13671373
let store_name = self.details.get_name();
13681374
let span_name = format!("{}({}) read operation: {}", store_name, loop_name, op_name);
13691375

1370-
let res = rw_loop.tx.send(Box::new(move || {
1376+
let res = rw_loop.send(Box::new(move || {
13711377
let db_span = warn_long(&span_name, Duration::from_millis(100));
13721378

13731379
let snapshot = db_to_send.snapshot();

0 commit comments

Comments
 (0)