Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

Light-Weight Threading / Continuations / Async-Await

Many languages have recently introduced light-weight threading mechanisms, basically an extension to coroutines that allows yielding not only in the called function, but also deeper down in the call chain. In particular, a light-weight thread would yield on blocking I/O. In I/O intensive applications (e.g., web servers), this can result in better performance since the kernel-mode thread switch overhead in case of blocking I/O is replaced by the cheaper user-mode switch to another light-weight thread.

Approaches in other Languages

Java

Project Loom introduces fibres and continuations in Project Loom.

Go

Go presents synchronous I/O in its APIs, but implements it using async I/O that permits fast context switches to other goroutines, see go scheduler.

JavaScript

Splits world in async and synchronous functions, see what Color is your Function.

Fuzion

How important is this in other applications than web-servers? Do improvements in OS kernels maybe make this user-mode scheduling obsolete?