3 ms·
This is a fine approach but it's trivial to ship green threads with no runtime support as well. Various libraries implementing the feature exist for C or Zig et
by anonymoushn 2y ago
This is a fine approach but it's trivial to ship green threads with no runtime support as well. Various libraries implementing the feature exist for C or Zig etc.
- kbolino 2y agoIf you can accept cooperative scheduling that runs tasks only on a single core, then yes, lightweight solutions exist. This is more like "event-driven coroutines" than "green threads" though. If you want "full" green threads with preemptive scheduling and parallel execution across multiple cores, then an active runtime is needed.