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@swift.org> wrote: > > public var myArray: Array<Int> { > lock.lock() > defer { lock.unlock() } > _myArray > } >
_______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users