News for hackers. Stuff that matters.
Re:Cooperative Threading by aidenn0 on Wednesday November 13, 2019 @12:19PM (#21526649)
I do wonder why byuu wrote his own library rather than using one of the half-dozen existing ones. Presumably there is something about this use-case that makes a dedicated library useful.
Re:Cooperative Threading by byuu on Wednesday November 13, 2019 @10:12PM (#21532439)
There's probably hundreds of these libraries. Almost everyone chooses to just write their own.

I wanted one because in 2007, no project existed that was laser-focused on maximizing performance (I switch threads tens of millions of times a second in my emulators), was lightweight enough (I implement my own schedulers for my emulators), and was portable enough (I am not even aware of a CPU architecture libco won't run on currently.)

The library is extremely small, and being in control of it allows me to adapt and support new targets directly as needed.