[swift-users] Data races with copy-on-write

Romain Jacquinot rjacquinot at me.com
Tue Dec 5 18:26:18 CST 2017


Sorry, forgot the “return" keyword in my example:

public var myArray: Array<Int> {
    lock.lock()
    defer { lock.unlock() }
    return _myArray
}

> On Dec 6, 2017, at 1:24 AM, Romain Jacquinot via swift-users <swift-users at swift.org> wrote:
> 
> public var myArray: Array<Int> {
>     lock.lock()
>     defer { lock.unlock() }
>     _myArray
> }
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20171206/f2dbbf79/attachment.html>


More information about the swift-users mailing list