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
180
The least you need to know about hashing in Swift
gregheo
0
120
Shared Mutable State
gregheo
0
400
Promises, Futures, and the Shape of Your Code
gregheo
0
59
Getting Under Swift’s Skin
gregheo
0
520
Sanitizing Threads for Fun & Profit
gregheo
0
120
Sanitizing All* The Things
gregheo
0
58
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
370
Other Decks in Technology
See All in Technology
DevSecOps入門:Security Development Lifecycleによる開発プロセスのセキュリティ強化
yuriemori
0
200
第27回クラウド女子会 ~re:Invent 振り返りLT会~ 私の周辺で反響のあった re:Invent 2024 アップデートつれづれ/reinvent-2024-update-reverberated-around-me
emiki
1
560
ソフトウェアアーキテクトのための意思決定術: Software Architecture and Decision-Making
snoozer05
PRO
8
1.9k
GDG Tokyo 生成 AI 論文をわいわい読む会
enakai00
0
250
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
10
120k
Women in Agile
kawaguti
PRO
2
120
生成AIを活用した機能を、顧客に提供するまでに乗り越えた『4つの壁』
toshiblues
1
170
Enhancing SRE Using AI
yoshiiryo1
1
120
製造業とソフトウェアは本当に共存できていたのか?品質とスピードを問い直す
takabow
12
3.1k
15年入社者に聞く! これまでのCAのキャリアとこれから
kurochan
1
130
メンバーがオーナーシップを発揮しやすいチームづくり
ham0215
2
340
20250122_FinJAWS
takuyay0ne
2
340
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
Six Lessons from altMBA
skipperchong
27
3.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
370
Statistics for Hackers
jakevdp
797
220k
YesSQL, Process and Tooling at Scale
rocio
170
14k
For a Future-Friendly Web
brad_frost
176
9.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Documentation Writing (for coders)
carmenintech
67
4.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
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! ☺