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

Atomic.swift is not work fine in iOS8 & 9 #747

Closed
Dcell opened this issue Jul 10, 2019 · 2 comments
Closed

Atomic.swift is not work fine in iOS8 & 9 #747

Dcell opened this issue Jul 10, 2019 · 2 comments

Comments

@Dcell
Copy link

Dcell commented Jul 10, 2019

ReactSwift :4.0 + or 5.0 +
Xcode:10.1
device:iOS8 5s

static func make() -> Lock {
		#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
		if #available(*, iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0) {
			return UnfairLock()
		}
		#endif

		return PthreadLock()
}

if iOS < 10 , PthreadLock is not work fine.
屏幕快照 2019-07-10 下午1 58 15

@Dcell
Copy link
Author

Dcell commented Jul 10, 2019

also I find.
let status = pthread_mutex_trylock(_lock)

[ iOS10 ] ----> status == 16
[ iOS8 ] ----> status == 11

public var EDEADLK: Int32 { get } /* Resource deadlock avoided */
/* 11 was EAGAIN */

I don't understand this comment....

if status == 11 , it will Execution assertionFailure

@Dcell
Copy link
Author

Dcell commented Jul 10, 2019

I add -O in [Build setting- > Other Swift Flags]
ignore assertionFailure , fix this issues...

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

No branches or pull requests

1 participant