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
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Shared, Exclusive, Mutable, Immutable
NSBudapest, May 2018
Greg Heo
May 10, 2018
More Decks by Greg Heo
See All by Greg Heo
Concurrency From the Ground Up
gregheo
0
250
The least you need to know about hashing in Swift
gregheo
0
210
Shared Mutable State
gregheo
0
540
Promises, Futures, and the Shape of Your Code
gregheo
0
72
Getting Under Swift’s Skin
gregheo
0
560
Sanitizing Threads for Fun & Profit
gregheo
0
170
Sanitizing All* The Things
gregheo
0
68
Thirteen Ways of Looking at a View Controller
gregheo
0
140
Five Unbelievable Secrets of Reactive Programming the Experts Don't Want You to Know!
gregheo
3
430
Other Decks in Technology
See All in Technology
Kiro Crew入門 - 常駐エージェントの仕組みと使いどころ / Intro to Kiro Crew
k_adachi_01
1
570
平文パスワードはログに“残り” ── 肝心の侵入は“痕跡すら残らない”
kuroneko13
0
100
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
280
LLM Internals: 언어 모델의 계보와 알고리즘 진화 (2023~2026)
inureyes
PRO
1
780
What's new in Go 1.27?
ciarana
0
280
その“隠したつもり”が命取り ── 自前と平文をやめて「正解」に委ねる
kuroneko13
0
130
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
5k
2027年のMetricKit
kantacky
0
120
ホームラボ紹介
y_sera15
0
210
tamachi.go 誕生の裏側
rymiyamoto
1
160
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
560
モノリス Rails でも日中に rails db:migrate を走らせたい! / Daytime rails db:migrate on Monolithic Rails!
euglena1215
4
650
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Tell your own story through comics
letsgokoyo
1
1k
The Limits of Empathy - UXLibs8
cassininazir
1
610
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Visualization
eitanlees
152
17k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Making Projects Easy
brettharned
120
6.7k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
470
Unsuck your backbone
ammeep
672
58k
30 Presentation Tips
portentint
PRO
1
370
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
210
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! ☺