Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 795 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 795 Bytes

gthreads

A tiny implementation of cooperative userspace threading as a zig library.

This is an experiment and not meant for production usage! Therefore I won't provide versioning or a changelog. If you want to use green threads in your app, try GNU Pth or write it in a language with built-in support like Go or Java 19.

But if you, like me, are interested in green threading, this might be what you're looking for. It was initially inspired by Green Threads Explained and then modified for my purpose.

The code in this repository will mostly not be portable, because of the handwritten assembly for saving and loading register values.