Skip to content

refactor(locks): use parking_lot's locks, which don't poison - #191

Merged
PiquelChips merged 1 commit into
mainfrom
refactor/parking-lot
Nov 25, 2026
Merged

PiquelChips merged 1 commit into
mainfrom
refactor/parking-lot

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

Every lock had to be unwrapped: .unwrap_or_else(PoisonError::into_inner) in code, .unwrap() in tests. parking_lot's Mutex, RwLock and Condvar never poison, so taking a lock is just .lock(). A Condvar now waits through &mut guard instead of taking the guard and handing it back.

This adds parking_lot 0.13, which brings lock_api, parking_lot_core, scopeguard and redox_syscall. It also raises libc from 0.2.190 to 0.2.191, because parking_lot_core requires it. cargo deny check passes.

This PR moves the code already on main. Every PR above it in the stack was rebuilt the same way, so the locks each one adds use parking_lot too.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

Every std lock was taken through `.unwrap_or_else(PoisonError::into_inner)`,
or `.unwrap()` in tests. parking_lot's `Mutex`, `RwLock` and `Condvar`
never poison, so taking one is just `.lock()`.
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a24e047c-a144-4720-aa97-68880cfe8a8b
Commits

Reviewing files that changed from the base of the PR and between 4717e73 and 43a67e5.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 10

  • Cargo.toml
  • apps/origin-src/Cargo.toml
  • apps/origin-src/src/queue/tests/changes.rs
  • apps/origin-src/src/service.rs
  • apps/origin-src/src/store/mod.rs
  • apps/origin-src/src/store/packs.rs
  • apps/origin-src/src/targets.rs
  • apps/origin-src/src/worktree.rs
  • crates/origin-platform/Cargo.toml
  • crates/origin-platform/src/durability.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PiquelChips
PiquelChips added this pull request to stack #192 November 24, 2026 23:00
@PiquelChips
PiquelChips merged commit 197af8d into main Nov 25, 2026
6 checks passed
@PiquelChips
PiquelChips deleted the refactor/parking-lot branch November 25, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant