Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26407] iOS: Replace OSSpinLock API with os_unfair_lock

GitHub Issuen/a
TypeStory
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterHans Knöchel
AssigneeUnknown
Created2018-09-22T15:19:21.000+0000
Updated2018-09-22T15:20:38.000+0000

Description

We use the OSSpinlock API in your kroll-core and some XML operations a lot. It has formally been deprecated as of iOS 10.0 and should be replaced by the os_unfair_lock (os_unfair_lock_lock and os_unfair_lock_unlock) API. The old API is meant to be unsafe on newer OS's, leading to possible crashes. Note: Also the os_unfair_lock is a suggested replacement by Apple, we may want to consider other locks that are more GCD focussed. Docs: - https://github.com/moby/hyperkit/issues/47 - https://developer.apple.com/documentation/os/1646466-os_unfair_lock_lock - https://blog.postmates.com/why-spinlocks-are-bad-on-ios-b69fc5221058

Comments

No comments

JSON Source