Skip to content

cactusdualcore/gthreads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.