Synchronize Properties in Swift 3 using GCD

后端 未结 2 1795
[愿得一人]
[愿得一人] 2021-02-07 12:16

I watched this years WWDC GCD talk lately and I think there is a code snippet something is wrong with. It is about making a property thread-safe using D

2条回答
  •  花落未央
    2021-02-07 12:35

    But i think this snippet is not valid, because the internalQueue could be concurrent

    But it isn't concurrent. Dispatch queues that you create are serial by default. That is the point of the technique (and the example).

提交回复
热议问题