From a33aec8d69cb1fc122417f34d78a3955f67b65ec Mon Sep 17 00:00:00 2001 From: gterzian <2792687+gterzian@users.noreply.github.com> Date: Mon, 17 Jul 2023 14:07:30 +0800 Subject: [PATCH] improve docs --- src/dochandle.rs | 1 + src/repo.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/dochandle.rs b/src/dochandle.rs index 011e1b5b..1309f1d8 100644 --- a/src/dochandle.rs +++ b/src/dochandle.rs @@ -28,6 +28,7 @@ pub struct DocHandle { /// or the last time it was access by any of the `with_doc` methods. /// Putting it in a mutex to maintain an API /// that doesn't require a mutabale reference to the handle. + /// Note: the mutex is not shared between clones of the same handle. last_heads: Mutex>, } diff --git a/src/repo.rs b/src/repo.rs index 2ce1d8df..6cd32071 100644 --- a/src/repo.rs +++ b/src/repo.rs @@ -84,6 +84,8 @@ pub(crate) fn new_repo_future_with_resolver() -> (RepoFuture, RepoFutureRe impl RepoHandle { /// Stop the repo running in the background. + /// All documents will have been saved when this returns. + /// /// This call will block the current thread. /// In an async context, use a variant of `spawn_blocking`. ///