Skynet 1M Fiber microbenchmark in D

drug drug2004 at bk.ru
Wed Oct 18 11:44:46 UTC 2017


18.10.2017 14:34, Nordlöw пишет:
> And how do I parallelize this over multiple worker threads? AFAICT 
> fibers are by default all spawned in the same main thread, right?
Probably it will works - every fiber substract 1 from its argument, then 
divides remainder by count of child fibers and spawns fibers with that 
value. so the last fibers gets 1 as its argument, then substract 1 from 
it, get zero and terminate.


More information about the Digitalmars-d-learn mailing list