Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Shared, Exclusive, Mutable, Immutable
Search
Greg Heo
May 10, 2018
Technology
0
140
Shared, Exclusive, Mutable, Immutable
NSBudapest, May 2018
Greg Heo
May 10, 2018
Tweet
Share
More Decks by Greg Heo
See All by Greg Heo
Concurrency From the Ground Up
gregheo
0
200
The least you need to know about hashing in Swift
gregheo
0
140
Shared Mutable State
gregheo
0
470
Promises, Futures, and the Shape of Your Code
gregheo
0
63
Getting Under Swift’s Skin
gregheo
0
520
Sanitizing Threads for Fun & Profit
gregheo
0
130
Sanitizing All* The Things
gregheo
0
60
Thirteen Ways of Looking at a View Controller
gregheo
0
130
Five Unbelievable Secrets of Reactive Programming the Experts Don't Want You to Know!
gregheo
3
400
Other Decks in Technology
See All in Technology
ProductZine Day 2025 Assuredのプロダクトディスカバリー
kechol
0
110
技術書典18結果報告
mutsumix
2
170
継続戦闘能⼒
sansantech
PRO
0
210
いまさら聞けない Git 超入門 〜Gitって結局なに?から始める第一歩〜
devops_vtj
0
110
オープンソースのハードウェアのコンテストに参加している話
iotengineer22
0
480
テストを実施する前に考えるべきテストの話 / Thinking About Testing Before You Test
nihonbuson
PRO
13
2k
OSMnx Galleryの紹介
mopinfish
0
150
やさしいClaude Code入門
minorun365
PRO
21
12k
SmartHRの複数のチームにおけるMCPサーバーの活用事例と課題
yukisnow1823
2
1.1k
ゴリラ.vim #36 ~ Vim x SNS ~ スポンサーセッション
yasunori0418
1
280
MCP で繋ぐ Figma とデザインシステム〜LLM を使った UI 実装のリアル〜
kimuson
1
1.1k
Devin&Cursor、それぞれの「本質」から導く最適ユースケース戦略
empitsu
3
400
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.3k
Side Projects
sachag
454
42k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Done Done
chrislema
184
16k
Optimizing for Happiness
mojombo
378
70k
Adopting Sorbet at Scale
ufuk
76
9.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.6k
A better future with KSS
kneath
239
17k
Fireside Chat
paigeccino
37
3.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Transcript
@gregheo ! NSBudapest, May 2018 Shared Exclusive Mutable Immutable
@gregheo ! NSBudapest, May 2018 Data "
@gregheo ! NSBudapest, May 2018 Code Example #
@gregheo ! NSBudapest, May 2018 Exclusive Shared Immutable Mutable
@gregheo ! NSBudapest, May 2018 Exclusive Shared Immutable Mutable
@gregheo ! NSBudapest, May 2018 Exclusive Shared Immutable private let
Screen size / scale Mutable private var private queue $
@gregheo ! NSBudapest, May 2018 Fewer entry points
@gregheo ! NSBudapest, May 2018 Private queues
@gregheo ! NSBudapest, May 2018 Queue Callback
@gregheo ! NSBudapest, May 2018 // call from anywhere!
public func something() { privateQueue.sync { … } }
@gregheo ! NSBudapest, May 2018 // always call on
the main queue! public func something()
@gregheo ! NSBudapest, May 2018 // always call on
the main queue! public func something() { dispatchPrecondition(condition: .onQueue(.main)) }
@gregheo ! NSBudapest, May 2018 Make it difficult to get
wrong
@gregheo ! NSBudapest, May 2018 köszönöm! ☺