Skip to content

Commit 687322b

Browse files
committed
docs: specify ThreadSafeRepository is not Send/Sync without "parallel"
1 parent 810b5cf commit 687322b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gix/src/types.rs

+6
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ pub struct Reference<'r> {
149149
/// Note that it clones itself so that it is empty, requiring the user to configure each clone separately, specifically
150150
/// and explicitly. This is to have the fastest-possible default configuration available by default, but allow
151151
/// those who experiment with workloads to get speed boosts of 2x or more.
152+
///
153+
/// Note: when built with `default-features = false`, this type is **not** `Send`.
154+
/// The minimal feature set to activate `Send` is `features = ["parallel"]`.
152155
pub struct Repository {
153156
/// A ref store with shared ownership (or the equivalent of it).
154157
pub refs: crate::RefStore,
@@ -182,6 +185,9 @@ pub struct Repository {
182185
/// it's merely meant to be able to exist in a `Sync` context.
183186
///
184187
/// Note that it can also cheaply be cloned, and it will retain references to all contained resources.
188+
///
189+
/// Note: when built with `default-features = false`, this type is **not** `Send` or `Sync`.
190+
/// The minimal feature set to activate `Send + Sync` is `features = ["parallel"]`.
185191
#[derive(Clone)]
186192
pub struct ThreadSafeRepository {
187193
/// A store for references to point at objects

0 commit comments

Comments
 (0)