Skip to content

Commit

Permalink
docs: specify ThreadSafeRepository is not Send/Sync without "parallel"
Browse files Browse the repository at this point in the history
  • Loading branch information
bryceberger committed Jan 25, 2025
1 parent 810b5cf commit 687322b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gix/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 687322b

Please sign in to comment.