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
150
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
240
The least you need to know about hashing in Swift
gregheo
0
180
Shared Mutable State
gregheo
0
520
Promises, Futures, and the Shape of Your Code
gregheo
0
68
Getting Under Swift’s Skin
gregheo
0
550
Sanitizing Threads for Fun & Profit
gregheo
0
160
Sanitizing All* The Things
gregheo
0
65
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
420
Other Decks in Technology
See All in Technology
スピンアウト講座06_認証系(API-OAuth-MCP)入門
overflowinc
0
720
Laravelで学ぶOAuthとOpenID Connectの基礎と実装
kyoshidaxx
4
1.7k
君はジョシュアツリーを知っているか?名前をつけて事象を正しく認識しよう / Do you know Joshua Tree?
ykanoh
2
110
Kiro Powers 入門
k_adachi_01
0
140
Kiroで見直す開発プロセスとAI-DLC
k_adachi_01
0
110
システム標準化PMOから ガバメントクラウドCoEへ
techniczna
1
160
2026年もソフトウェアサプライチェーンのリスクに立ち向かうために / Product Security Square #3
flatt_security
1
740
Escape from Excel方眼紙 ~マークダウンで繋ぐ、人とAIの架け橋~ /nikkei-tech-talk44
nikkei_engineer_recruiting
0
170
スピンアウト講座03_CLAUDE-MDとSKILL-MD
overflowinc
0
810
テストプロセスにおけるAI活用 :人間とAIの共存
hacomono
PRO
0
130
スピンアウト講座02_ファイル管理
overflowinc
0
840
Phase04_ターミナル基礎
overflowinc
0
1.5k
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
First, design no harm
axbom
PRO
2
1.1k
Believing is Seeing
oripsolob
1
90
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Chasing Engaging Ingredients in Design
codingconduct
0
150
Everyday Curiosity
cassininazir
0
170
The browser strikes back
jonoalderson
0
820
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
92
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
690
Navigating Team Friction
lara
192
16k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
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! ☺