摘要:
一、代码示例 // // ViewController.swift // LazyTest // // Created by lilun.ios on 2021/7/30. // import UIKit class ViewController: UIViewController { lazy v 阅读全文
摘要:
结构体并不代表线程安全,swift在此上未做保证 func testScenarioA() throws { var store: Int = 0 DispatchQueue.concurrentPerform(iterations: 1_000_000) { i in store = i _ = 阅读全文