Mikhail Maslo

Coroutine explained yet again 60 years later

What if you could write asynchronous code that looks completely sequential? Discover how coroutines, a 60-year-old concept, finally solve callback hell.

Coroutine explained yet again 60 years later
#1about 1 minute

Celebrating the 60-year history of coroutines

Coroutines were first introduced 60 years ago by Melvin Conway in his work on a COBOL compiler to optimize its structure.

#2about 7 minutes

How coroutines suspend and resume using state machines

Unlike regular functions, coroutines can suspend their execution and resume later, a process managed internally by a state machine.

#3about 4 minutes

Comparing stackful and stackless coroutine models

Stackful coroutines have their own dedicated stack and can suspend from nested functions, while stackless coroutines save their state on the heap.

#4about 7 minutes

Exploring symmetric and asymmetric coroutine control flow

Asymmetric coroutines return control to their caller upon suspension, whereas symmetric coroutines can transfer control directly to another coroutine.

#5about 7 minutes

How coroutines fit into modern threading models

Coroutines function as lightweight user-level threads that are managed within a process, making them more memory-efficient than kernel threads.

#6about 5 minutes

Using coroutines to write linear asynchronous code

Modern languages use coroutines with async/await syntax to transform nested callbacks into linear, more readable code for I/O-bound operations.

Related jobs
Jobs that call for the skills explored in this talk.

test

Milly
Vienna, Austria

Intermediate

test

Milly
Vienna, Austria

Intermediate

Featured Partners

Related Articles

View all articles
CH
Chris Heilmann
All the videos of Halfstack London 2024!
Last month was Halfstack London, a conference about the web, JavaScript and half a dozen other things. We were there to deliver a talk, but also to record all the sessions and we're happy to share them with you. It took a bit as we had to wait for th...
All the videos of Halfstack London 2024!
AP
Anto Pranjić
5 Reasons Why Attending Conferences Matters More Than You Think
It only took us a global pandemic to realize that most of our daily work can be done from home. It’s kind of funny, but things that weren’t meant to be done from home in the past such as attending meetings, managing teams, and even attending events a...
5 Reasons Why Attending Conferences Matters More Than You Think

From learning to earning

Jobs that call for the skills explored in this talk.