Skip to content

Generalize atomic/mutable lock patterns.#4961

Merged
toots merged 1 commit intomainfrom
generalize-atomic-mutable-lock
Mar 5, 2026
Merged

Generalize atomic/mutable lock patterns.#4961
toots merged 1 commit intomainfrom
generalize-atomic-mutable-lock

Conversation

@toots
Copy link
Member

@toots toots commented Mar 5, 2026

This PR generalizes the new, fastest locking patterns to source's mutexify methods:

  • atomic_lock is a fast, atomic-based lock. Anything using it is expected to terminate very fast. Waiting on this lock is active, done via Domain.relax_cpu
  • mutable_lock is a slow, mutex-based lock. It should be used for slow operations. Waiting on this lock is done via a Atomic.wait and mutex.

Also, input.srt had some unnecessary waiting patterns on Strings.Mutable which is always protected by a similar dual mechanism.

@toots toots force-pushed the generalize-atomic-mutable-lock branch 3 times, most recently from eb1f509 to d0afd13 Compare March 5, 2026 14:34
@toots toots force-pushed the generalize-atomic-mutable-lock branch from d0afd13 to 613b27f Compare March 5, 2026 14:43
@toots toots merged commit 5845027 into main Mar 5, 2026
49 checks passed
@toots toots deleted the generalize-atomic-mutable-lock branch March 5, 2026 14:55
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