Comment

Comment by neonsunset

C# tasks are lightweight, and I'd expect for per-task overhead to be significantly lower than that of Erlang's.

e.g.:

    var delay = Task.Delay(3_000);
    var tasks = Enumerable
        .Repeat(async () => await delay, 1_000_000)
        .Select(f => f());

    Console.WriteLine("Waiting for 1M tasks...");
    await Task.WhenAll(tasks);
    Console.WriteLine("Finished!");
edit: consider suggesting a comparable example in Erlang before downvoting :)
parent neonsunset 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton