non local udpate actor

This commit is contained in:
mpostma 2021-03-04 19:30:13 +01:00
parent f090f42e7a
commit c2282ab5cb
No known key found for this signature in database
GPG Key ID: CBC8A7C1D7A28C3A

View File

@ -140,7 +140,7 @@ pub struct UpdateActorHandle<D> {
impl<D> UpdateActorHandle<D> impl<D> UpdateActorHandle<D>
where where
D: AsRef<[u8]> + Sized + 'static, D: AsRef<[u8]> + Sized + 'static + Sync + Send,
{ {
pub fn new(index_handle: IndexActorHandle, path: impl AsRef<Path>) -> Self { pub fn new(index_handle: IndexActorHandle, path: impl AsRef<Path>) -> Self {
let path = path.as_ref().to_owned().join("updates"); let path = path.as_ref().to_owned().join("updates");
@ -148,7 +148,7 @@ where
let store = MapUpdateStoreStore::new(index_handle, &path); let store = MapUpdateStoreStore::new(index_handle, &path);
let actor = UpdateActor::new(store, receiver, path); let actor = UpdateActor::new(store, receiver, path);
tokio::task::spawn_local(actor.run()); tokio::task::spawn(actor.run());
Self { sender } Self { sender }
} }
@ -207,5 +207,3 @@ impl UpdateStoreStore for MapUpdateStoreStore {
} }
} }
} }