ReactiveCocoa / ReactiveSwift

Streams of values over time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Atomic.swift is not work fine in iOS8 & 9

Dcell opened this issue · comments

commented

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

commented

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

commented

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