MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / try_lock_workspace_operation

Method try_lock_workspace_operation

atomic-repository/src/repository/locks.rs:378–385  ·  view source on GitHub ↗

Enter the operation hierarchy as a workspace transaction owner. Only this outer boundary permits same-thread nested repository operations to reuse its locks. Ordinary independent acquisitions still contend.

(
        &self,
        working_copy: WorkingCopyId,
    )

Source from the content-addressed store, hash-verified

376 /// Only this outer boundary permits same-thread nested repository operations
377 /// to reuse its locks. Ordinary independent acquisitions still contend.
378 pub(super) fn try_lock_workspace_operation(
379 &self,
380 working_copy: WorkingCopyId,
381 ) -> Result<WorkingCopyOperationLockGuard, RepositoryError> {
382 self.validate_working_copy(working_copy)?;
383 self.try_lock_common_operation_with_reentrancy(true)?
384 .try_lock_working_copy(working_copy)
385 }
386}
387
388impl RepositoryCommonLockGuard {

Callers 6

insert_changeMethod · 0.80
insert_change_recMethod · 0.80
insert_from_viewMethod · 0.80
record_with_lifecycleMethod · 0.80
revise_stackMethod · 0.80

Tested by

no test coverage detected