Microthreads are Keid's equivalent to Goroutines in Golang. They are very lightweight and are either executed asynchronously in the same kernel thread as other microthreads, or pooled in a kernel thread pool along with other microthreads. Asynchronous operations function as a state machine, similar to IEnumerator<T> in C#. The Keid runtime receives events either to block a microthread or to resume it, which is all performed without any actual thread halts or locking; other resources are given priority until an interrupt event to the Keid runtime is received that being executing the next state of the microthread state machine.
Microthreads are Keid's equivalent to Goroutines in Golang. They are very lightweight and are either executed asynchronously in the same kernel thread as other microthreads, or pooled in a kernel thread pool along with other microthreads. Asynchronous operations function as a state machine, similar to
IEnumerator<T>
in C#. The Keid runtime receives events either to block a microthread or to resume it, which is all performed without any actual thread halts or locking; other resources are given priority until an interrupt event to the Keid runtime is received that being executing the next state of the microthread state machine.