Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Multi-Threading using NSOperation
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Zeeshan Khan
August 18, 2014
Programming
320
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Multi-Threading using NSOperation
Zeeshan Khan
August 18, 2014
More Decks by Zeeshan Khan
See All by Zeeshan Khan
Core Data Migration
izeeshan
0
63
Multithreading using NSOperation - 2
izeeshan
0
120
Proxy Server
izeeshan
1
410
Other Decks in Programming
See All in Programming
App Intentsのビルドプロセスを支える技術
kntkymt
0
190
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
360
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
490
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
440
AIとGame Jamで、ゲームを完成させた話
takahirosaeki
0
120
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.1k
Building an Out-of-Order CPU
latte72
1
750
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
470
Family mrubyの進捗
kishima
1
110
アクセシビリティから考える情報設計
high_g_engineer
0
350
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
430
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Making Projects Easy
brettharned
120
6.7k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
530
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Curious Case for Waylosing
cassininazir
1
500
Believing is Seeing
oripsolob
1
210
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
880
Transcript
Multi - Threading by zeeshan 1
CPU Why do we have n number of Core(s)? 2
nothing is limitless & every problem has a solution Clock
Speed A time unit 3
Thread ‘Kernel-level’ + ‘Application-level’ Data Structures An application can use
multiple cores by creating multiple threads. 4 Parallel Computation Asynchronous Solution
Key Terms • Process • Thread (Safe / Un-Safe) •
Task • Concurrent / Non-Concurrent • Concurrent vs Parallel 5
NSThread POSIX (Mavericks is 100% POSIX conferment) 6 Life Cycle
Hazard of Threaded Programming • UIKit access • Database access
• Stale result • Cancellation • De-allocation 7
Solutions • Operations (Current Session) • GCD (Next Session) •
Notification Queue • Asynchronous (Hopefully Next to Next Session) • Timers 8
NS Operation to the rescue 9
NS Operations • Manage all threaded code • Model asynchronous
operations • KVO Support • Dependencies • Priorities 10
NS Operation II • Thread Confinement • Completion Block •
Cancellation • Concurrent vs Non-Concurrent • Some Caveats... 11
NS Operation Queue • Simpler, Name it • Add, Ready
& Execute, Cancel | Finish • Pending Operations • Multiple Queues • Threads & Queues 12
NS Operations Queue II • Queue Width • Pause (Suspended)
Queues • Cancellation • KVC Compliant • Add Operation with Blocks 13
NS Operations - Use • Blocks • Concrete sub classes
• Selector • Block • User defined sub classes 14
References: • Multithreading Using NSOperation (http:// izeeshan.wordpress.com/2014/08/17/multi-threading- using-nsoperation/) • Concurrency
Programming Guide • Threading Programming Guide • API References 15
Any Questions? Thank you! @zeeshan_khan http://izeeshan.wordpress.com/ 16
17 @zeeshan_khan