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
98
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
130
The least you need to know about hashing in Swift
gregheo
0
92
Shared Mutable State
gregheo
0
300
Promises, Futures, and the Shape of Your Code
gregheo
0
42
Getting Under Swift’s Skin
gregheo
0
510
Sanitizing Threads for Fun & Profit
gregheo
0
94
Sanitizing All* The Things
gregheo
0
44
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
300
Other Decks in Technology
See All in Technology
Meta Quest 3 で動く桜マシマシ WebXR アプリを IBM Cloud Code Engine と Babylon.js で作った話
1ftseabass
PRO
0
120
本当のAWS基礎
toru_kubota
0
520
JAWS-UG Bedrock Claude Night
yamahiro
3
610
Java EE/Jakarta EEの現状と将来―クラウドネイティブ時代にJava EEは対応できるのか?―
takakiyo
1
160
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.3k
Kernel MemoryでAzure OpenAI Serviceとお手軽データソース連携
mitsuzono
1
250
Cloud Native Java with Spring Boot (CNCF Aarhus, April 2024)
thomasvitale
1
170
JSON攻略法.pdf
miyakemito
8
5.1k
Tellus の衛星データを見てみよう #mf_fukuoka
kongmingstrap
0
190
オーナーシップを持つ領域を明確にする
konifar
13
3.2k
一生覚えておきたい「システム開発=コミュニケーション」〜初めての実務案件振り返りLT〜
maimyyym
0
140
MapLibreとAmazon Location Service
dayjournal
1
160
Featured
See All Featured
What's new in Ruby 2.0
geeforr
337
31k
Designing for humans not robots
tammielis
248
25k
Optimizing for Happiness
mojombo
370
69k
What the flash - Photography Introduction
edds
64
11k
Infographics Made Easy
chrislema
238
18k
Unsuck your backbone
ammeep
663
57k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Scaling GitHub
holman
457
140k
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
7
1k
The Power of CSS Pseudo Elements
geoffreycrofte
60
5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
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! ☺