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

Method try_lock_workspace_operation

atomic-repository/src/repository/locks.rs:353–360  ·  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

351 /// Only this outer boundary permits same-thread nested repository operations
352 /// to reuse its locks. Ordinary independent acquisitions still contend.
353 pub(super) fn try_lock_workspace_operation(
354 &self,
355 working_copy: WorkingCopyId,
356 ) -> Result<WorkingCopyOperationLockGuard, RepositoryError> {
357 self.validate_working_copy(working_copy)?;
358 self.try_lock_common_operation_with_reentrancy(true)?
359 .try_lock_working_copy(working_copy)
360 }
361}
362
363impl 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