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
Multi-Threading using NSOperation
Search
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
60
Multithreading using NSOperation - 2
izeeshan
0
110
Proxy Server
izeeshan
1
400
Other Decks in Programming
See All in Programming
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
250
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
180
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.1k
3Dシーンの圧縮
fadis
1
770
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
240
AIで効率化できた業務・日常
ochtum
0
140
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
560
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
550
New "Type" system on PicoRuby
pocke
1
950
CSC307 Lecture 17
javiergs
PRO
0
320
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
160
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
390
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The Cult of Friendly URLs
andyhume
79
6.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
A Tale of Four Properties
chriscoyier
163
24k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
420
How to build a perfect <img>
jonoalderson
1
5.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Leo the Paperboy
mayatellez
7
1.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
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