I still don't understand what you mean by "distributed". Spawning 50.000 tasks:

        import vibe.core.core;
        import std.stdio;
        
        void main()
        {
            foreach (i; 0 .. 50_000)
                runTask({
                        writefln("Hello, World!");
                });
        }

Alternatively, runWorkerTask will also distribute the tasks among a set of worker threads, which would be more in line with Go AFAIK.

Hello Sönke,

would it be possible in vibe.d to spawn a task the usual actor-style way as it is done with kernel threads in D? What I mean is this:

void spawnedFunc(Tid tid)
{
   receive(
     (int i) { writeln("Received the number ", i);}
   );

}

auto tid = spawn(&spawnedFunc, thisTid);


Thanks, Bienlein

Reply via email to