Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Shared, Exclusive, Mutable, Immutable

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Shared, Exclusive, Mutable, Immutable

NSBudapest, May 2018

Avatar for Greg Heo

Greg Heo

May 10, 2018
Tweet

More Decks by Greg Heo

Other Decks in Technology

Transcript

  1. @gregheo ! NSBudapest, May 2018 Exclusive Shared Immutable private let

    Screen size / scale Mutable private var
 private queue $
  2. @gregheo ! NSBudapest, May 2018 
 // call from anywhere!


    public func something() {
 privateQueue.sync { … } }

  3. @gregheo ! NSBudapest, May 2018 
 // always call on

    the main queue!
 public func something() 

  4. @gregheo ! NSBudapest, May 2018 
 // always call on

    the main queue!
 public func something() {
 dispatchPrecondition(condition: .onQueue(.main))
 }