Skip to content

Update NIOLock to use Synchronization.Mutex#1

Merged
asdf-bro merged 1 commit intomainfrom
asdf-bro-mutex-refresh
Oct 28, 2025
Merged

Update NIOLock to use Synchronization.Mutex#1
asdf-bro merged 1 commit intomainfrom
asdf-bro-mutex-refresh

Conversation

@asdf-bro
Copy link
Owner

Now that we require Swift 6.0, update NIOLock and NIOLockedValueBox to use Synchronization.Mutex. Additionally, move all pthread_mutex_t and SRWLOCK code into lock.swift to support our condition variable type.

Result:

  • Much simpler code
  • Better or equal performance, depending on the platform

Now that we require Swift 6.0, update `NIOLock` and `NIOLockedValueBox` to use `Synchronization.Mutex`.  Additionally, move all `pthread_mutex_t` and `SRWLOCK` code into `lock.swift` to support our condition variable type.

Results:
- Much simpler code
- Better or equal performance, depending on the platform
@asdf-bro asdf-bro merged commit ffc91b5 into main Oct 28, 2025
45 of 53 checks passed
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