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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Zeeshan Khan
August 18, 2014
Programming
0
310
Multi-Threading using NSOperation
Zeeshan Khan
August 18, 2014
Tweet
Share
More Decks by Zeeshan Khan
See All by Zeeshan Khan
Core Data Migration
izeeshan
0
55
Multithreading using NSOperation - 2
izeeshan
0
100
Proxy Server
izeeshan
1
390
Other Decks in Programming
See All in Programming
高速開発のためのコード整理術
sutetotanuki
1
390
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
650
AtCoder Conference 2025
shindannin
0
1k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
980
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
690
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
今から始めるClaude Code超入門
448jp
7
8.5k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
組織で育むオブザーバビリティ
ryota_hnk
0
170
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
190
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
440
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
For a Future-Friendly Web
brad_frost
182
10k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
190
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
Between Models and Reality
mayunak
1
180
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
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