Slide 1

Slide 1 text

iOS concurrency, the run loop, and GCD BN.University

Slide 2

Slide 2 text

Concurrency in iOS

Slide 3

Slide 3 text

main.m

Slide 4

Slide 4 text

The Run Loop

Slide 5

Slide 5 text

The run loop

Slide 6

Slide 6 text

UI Threading

Slide 7

Slide 7 text

Queues

Slide 8

Slide 8 text

Blocks

Slide 9

Slide 9 text

Libdispatch

Slide 10

Slide 10 text

Tools for Concurrency

Slide 11

Slide 11 text

Tools for Concurrency NSOperation{,Queue} Grand Central Dispatch NSThread POSIX threads

Slide 12

Slide 12 text

POSIX threads

Slide 13

Slide 13 text

Tools for Concurrency NSOperation{,Queue} Grand Central Dispatch NSThread POSIX threads

Slide 14

Slide 14 text

NSThread

Slide 15

Slide 15 text

NSThread Server Connections? File System Watching? Database Connection? Regular (cron-like) event?

Slide 16

Slide 16 text

Tools for Concurrency NSOperation{,Queue} Grand Central Dispatch NSThread POSIX threads

Slide 17

Slide 17 text

Grand Central Dispatch

Slide 18

Slide 18 text

Grand Central Dispatch Parallel Array Iteration

Slide 19

Slide 19 text

Grand Central Dispatch Dispatching a background task

Slide 20

Slide 20 text

Grand Central Dispatch Calling back for UI Updates

Slide 21

Slide 21 text

Tools for Concurrency NSOperation{,Queue} Grand Central Dispatch NSThread POSIX threads

Slide 22

Slide 22 text

NSOperation{,Queue}

Slide 23

Slide 23 text

NSOperation{,Queue}

Slide 24

Slide 24 text

NSOperation{,Queue} Image Metrics Colorize Resize UI JPEG Upload

Slide 25

Slide 25 text

Demo!