Skip to content

Commit 9600a17

Browse files
committed
tokio snapshot helper
1 parent 9b6e4dc commit 9600a17

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

crates/core/src/db/snapshot.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ impl SnapshotWorker {
9898
}
9999
}
100100

101+
/// Create a new [SnapshotWorker] on the current Tokio runtime.
102+
pub fn new_tokio_current(snapshot_repository: Arc<DynSnapshotRepo>, compression: Compression) -> Self {
103+
Self::new(snapshot_repository, compression, Handle::tokio_current())
104+
}
105+
101106
/// Finish the initialization of [Self] by passing a [SnapshotDatabaseState],
102107
/// or replace the current [SnapshotDatabaseState] with a new one.
103108
///

0 commit comments

Comments
 (0)