Comment

Comment by dkjaudyeqooe

These are stackful coroutines, as opposed to stackless.

Stackful coroutines create a new stack for each coroutine thread and save and restore the appropriate registers when switching. Stackless coroutines are basically normal C functions that have been hacked to save their local variables between calls and use gotos (or, notoriously, a switch statement) to resume from where they last yielded. Both are very useful in their own way.

This is a great project and I'll be trying it out in my current work.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton