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
460
Promises, Futures, and the Shape of Your Code
gregheo
0
61
Getting Under Swift’s Skin
gregheo
0
520
Sanitizing Threads for Fun & Profit
gregheo
0
120
Sanitizing All* The Things
gregheo
0
59
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
390
Other Decks in Technology
See All in Technology
Terraform にコントリビュートしていたら Azure のコストをやらかした話 / How I Messed Up Azure Costs While Contributing to Terraform
nnstt1
1
420
MCPを理解する
yudai00
14
9.9k
LangfuseではじめるAIアプリのLLMトレーシング
codenote
0
140
LINE 購物幕後推手
line_developers_tw
PRO
0
420
AI-in-the-Enterprise|OpenAIが公開した「AI導入7つの教訓」——ChatGPTで変わる企業の未来とは?
customercloud
PRO
0
160
Global Azure2025(GitHub Copilot ハンズオン)
tomokusaba
2
690
ソフトウェアテスト 最初の一歩 〜テスト設計技法をワークで体験しながら学ぶ〜 #JaSSTTokyo / SoftwareTestingFirstStep
nihonbuson
PRO
1
110
10分で学ぶ、RAGの仕組みと実践
supermarimobros
0
890
地味にいろいろあった! 2025春のAmazon Bedrockアップデートおさらい
minorun365
PRO
2
570
MySQL Indexes and Histograms – How they really speed up your queries
lefred
0
150
Dataverseの検索列について
miyakemito
1
180
Асинхронная коммуникация в Go: от понятного к душному. Дима Некрасов, Otello, 2ГИС
lamodatech
0
2k
Featured
See All Featured
Building Applications with DynamoDB
mza
94
6.4k
Making Projects Easy
brettharned
116
6.2k
Documentation Writing (for coders)
carmenintech
71
4.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Agile that works and the tools we love
rasmusluckow
329
21k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
840
Raft: Consensus for Rubyists
vanstee
137
6.9k
Done Done
chrislema
184
16k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
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! ☺