You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.
I get Swift access race in Squid.Locked.lock() -> () at 0x7b080002f4e0 when running Squid under Xcode thread sanitizer. My understanding is there's not currently an actual issue in the threading code due to the way that Swift is generating code, but the thread analyzer can't be sure, so generates the warning.
I think to fix warning you can replace:
internal class Locked<Value> {
private var _lock = os_unfair_lock()
...
with:
internal class Locked<Value> {
private var _lock: UnsafeMutablePointer<os_unfair_lock>
init(_ value: Value) {
_lock = UnsafeMutablePointer<os_unfair_lock>.allocate(capacity: 1)
_lock.initialize(to: os_unfair_lock())
self._value = value
}
I get
Swift access race in Squid.Locked.lock() -> () at 0x7b080002f4e0
when running Squid under Xcode thread sanitizer. My understanding is there's not currently an actual issue in the threading code due to the way that Swift is generating code, but the thread analyzer can't be sure, so generates the warning.I think to fix warning you can replace:
with:
I found this solution and an explanation here:
http://www.russbishop.net/the-law
The text was updated successfully, but these errors were encountered: