Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more tolerate with error code returned by pthread_mutex_trylock. #788

Merged
merged 3 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# master
*Please add new entries at the top.*

1. Fix a debug assertion in `Lock.try()` that could be raised in earlier OS versions (< iOS 10.0, < macOS 10.12). (#747, #788)

Specifically, ReactiveSwift now recognizes `EDEADLK` as expected error code from `pthread_mutex_trylock` alongside `0`, `EBUSY` and `EAGAIN`.

# 6.3.0
1. `Property` and `MutableProperty` can now be used as property wrapper. Note that they remain a reference type container, so it may not be appropriate to use them in types requiring value semantics. (#781)
```swift
Expand Down
2 changes: 1 addition & 1 deletion Sources/Atomic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ internal class Lock {
switch status {
case 0:
return true
case EBUSY, EAGAIN:
case EBUSY, EAGAIN, EDEADLK:
return false
default:
assertionFailure("Unexpected pthread mutex error code: \(status)")
Expand Down