From 687322b45787a2552fb16a8d1fed8630318f9148 Mon Sep 17 00:00:00 2001 From: Bryce Berger Date: Sat, 25 Jan 2025 15:43:44 -0500 Subject: [PATCH] docs: specify ThreadSafeRepository is not Send/Sync without "parallel" --- gix/src/types.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gix/src/types.rs b/gix/src/types.rs index b9f8cced54f..6e43a07f90b 100644 --- a/gix/src/types.rs +++ b/gix/src/types.rs @@ -149,6 +149,9 @@ pub struct Reference<'r> { /// Note that it clones itself so that it is empty, requiring the user to configure each clone separately, specifically /// and explicitly. This is to have the fastest-possible default configuration available by default, but allow /// those who experiment with workloads to get speed boosts of 2x or more. +/// +/// Note: when built with `default-features = false`, this type is **not** `Send`. +/// The minimal feature set to activate `Send` is `features = ["parallel"]`. pub struct Repository { /// A ref store with shared ownership (or the equivalent of it). pub refs: crate::RefStore, @@ -182,6 +185,9 @@ pub struct Repository { /// it's merely meant to be able to exist in a `Sync` context. /// /// Note that it can also cheaply be cloned, and it will retain references to all contained resources. +/// +/// Note: when built with `default-features = false`, this type is **not** `Send` or `Sync`. +/// The minimal feature set to activate `Send + Sync` is `features = ["parallel"]`. #[derive(Clone)] pub struct ThreadSafeRepository { /// A store for references to point at objects