Advance from the common lock to one working-copy lock without blocking.
(
self,
working_copy: WorkingCopyId,
)
| 402 | |
| 403 | /// Advance from the common lock to one working-copy lock without blocking. |
| 404 | pub(super) fn try_lock_working_copy( |
| 405 | self, |
| 406 | working_copy: WorkingCopyId, |
| 407 | ) -> Result<WorkingCopyOperationLockGuard, RepositoryError> { |
| 408 | let path = working_copy_operation_lock_path(&self.dot_dir, working_copy); |
| 409 | let working_copy_lock = try_lock_file( |
| 410 | &path, |
| 411 | RepositoryLockKind::WorkingCopy { id: working_copy }, |
| 412 | self.reentrant, |
| 413 | )?; |
| 414 | Ok(WorkingCopyOperationLockGuard { |
| 415 | _working_copy_lock: working_copy_lock, |
| 416 | common: self, |
| 417 | working_copy, |
| 418 | }) |
| 419 | } |
| 420 | |
| 421 | /// A same-thread alias of this held common lock (CB-8B): the nested |
| 422 | /// projection executor builds its own working-copy guard under the |