Modifying struct instance variables within a Dispatch closure in Swift
问题 I'm using the DEVELOPMENT-SNAPSHOT-2016-06-06-a version of Swift. I cannot seem to get around this issue, I've tried using @noescape in various places, but I still have the following error: Closure cannot implicitly capture a mutating self parameter To better explain, here is a simple example: public struct ExampleStruct { let connectQueue = dispatch_queue_create("connectQueue", nil) var test = 10 mutating func example() { if let connectQueue = self.connectQueue { dispatch_sync(connectQueue)