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
120
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
150
The least you need to know about hashing in Swift
gregheo
0
99
Shared Mutable State
gregheo
0
340
Promises, Futures, and the Shape of Your Code
gregheo
0
51
Getting Under Swift’s Skin
gregheo
0
510
Sanitizing Threads for Fun & Profit
gregheo
0
100
Sanitizing All* The Things
gregheo
0
48
Thirteen Ways of Looking at a View Controller
gregheo
0
120
Five Unbelievable Secrets of Reactive Programming the Experts Don't Want You to Know!
gregheo
3
330
Other Decks in Technology
See All in Technology
AWSで”最小権限の原則”を実現するための考え方 /20240722-ssmjp-aws-least-privilege
opelab
10
4.4k
年間一億円削減した時系列データベースのアーキテクチャ改善~不確実性の高いプロジェクトへの挑戦~
lycorptech_jp
PRO
3
2.9k
MySQLのロックの種類とその競合
yoku0825
6
1.6k
フルリモートワークはエンジニアの夢を叶えたか? #cm_odyssey
mamohacy
2
600
VPoEの視点から見た、ヘンリーがサーバーサイドKotlinを使う理由 / Why Server-side Kotlin 2024
cho0o0
1
420
E2Eテスト自動化プラットフォームにおけるAIの活用
shift_evolve
0
190
目標設定は好きですか? アジャイルとともに目標と向き合い続ける方法 / Do you like target Management?
kakehashi
10
3k
JBUG岡山 #6 WordCamp男木島の チームビルディング
takeshifurusato
0
150
20240724_cm_odyssey_hibiyatech
hiashisan
0
110
What if...? 처음부터 다시 LLM 어플리케이션을 개발한다면
huffon
0
1k
Github Actions 로 Android 팀의 효율성 극대화
hadonghyun
0
160
dxd2024-生成AIに振り回された3か月間の成功と失敗/dxd2024-link-and-motivation
lmi
2
260
Featured
See All Featured
Building Your Own Lightsaber
phodgson
101
5.9k
Building an army of robots
kneath
301
42k
Facilitating Awesome Meetings
lara
46
5.8k
WebSockets: Embracing the real-time Web
robhawkes
59
7.2k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Infographics Made Easy
chrislema
238
18k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
44
4.7k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Code Review Best Practice
trishagee
58
16k
Design by the Numbers
sachag
277
18k
How STYLIGHT went responsive
nonsquared
93
5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
90
47k
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! ☺