What is a Fiber and the Spawn typeclass?
series/3.xThe Spawn typeclass provides a lightweight, semantic thread-like abstraction called a Fiber. Unlike JVM Threads, which are expensive and limited in number, Fibers are extremely lightweight (roughly 128 bytes in IO) and can be scaled to millions of concurrent instances.
Fibers represent parallel semantic threads of execution. The runtime handles the mapping of these fibers to actual kernel threads in an optimal way for the specific platform (e.g., JVM or JavaScript).
While Fibers are often used as implementation details for higher-level concurrency tools, you interact with them primarily through the .start method provided by Spawn.