Hmm… async stuffs πŸ€”

Single-threaded

E.g Bank with a one teller

Bank with a one teller
Bank with a one teller

Event Loop

E.g Line to use the bathroom

BATHROOM LINE
BATHROOM LINE

Non-blocking

E.g Forgot papers, next person serviced

Non-blocking Service
Non-blocking Service

Avoid blocking

Don’t hog the bathroom

DON'T HOG THE BATHROOM
DON'T HOG THE BATHROOM

Run to completion

Satisfy customer before next

SATISFIED πŸ˜„
SATISFIED πŸ˜„

Cooperative Concurrency

Customers play nice

CUSTOMER PLAY NICE πŸ˜‰
CUSTOMER PLAY NICE πŸ˜‰

Little Programs

Customers in line

CUSTOMERS IN LINE 😯
CUSTOMERS IN LINE 😯

Think explicitly about Asynchronous Seams

Think πŸ€”
Think πŸ€”

Timer delay not guaranteed

Calendar, Todo list

CALENDAR πŸ“†
CALENDAR πŸ“†
TODO LIST πŸ”
TODO LIST πŸ”

Not always async

Quack, waddle but not a duck

Quack πŸ₯
Quack πŸ₯

Race conditions in order of queue

Race conditon πŸƒ
Race conditon πŸƒ
WOOOW πŸ¦„
WOOOW πŸ¦„