Fibers: Microthreading Library for .NET / Unity
Runtime/Threading/Fibers.cs
HeaderDoc
(c) 2025 Sator Imaging, Licensed under the MIT License https://github.com/sator-imaging/Unity-Fundamentals
Fibers is a powerful and efficient coroutine/microthreading library for C#
ported from TypeScript ts-fibers.
Basic Usage
// create fibers based on the array
await using var fibers = Fibers.ForEach(
concurrency: 4,
tonsOfUrls
async (url) =>
{
return await DownloadAsync(url);
});
// iterate items in order as they complete
await foreach (var result in fibers)
{
Console.WriteLine(result);
}