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
Zeeshan Khan
August 18, 2014
Programming
330
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
65
Multithreading using NSOperation - 2
izeeshan
0
120
Proxy Server
izeeshan
1
420
Other Decks in Programming
See All in Programming
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
120
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.3k
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
260
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
340
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.9k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
460
Seven New Principles of Software Engineering
yegor256
0
350
AmebaブログはKMPから卒業します
kmars0605
0
280
Event is what happens
moro
2
1.7k
ActionController meets Protocol Buffers
sorah
1
730
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.5k
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
We Have a Design System, Now What?
morganepeng
55
8.4k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
440
sira's awesome portfolio website redesign presentation
elsirapls
0
470
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
560
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
310
HDC tutorial
michielstock
2
980
Utilizing Notion as your number one productivity tool
mfonobong
4
630
Typedesign – Prime Four
hannesfritz
42
3.2k
Side Projects
sachag
456
43k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
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