On Thursday, 6 February 2014 at 19:24:39 UTC, Sean Kelly wrote:
On Wednesday, 5 February 2014 at 20:37:44 UTC, Sean Kelly wrote:

https://github.com/D-Programming-Language/phobos/pull/1910

Hello,

I have a little question about how pre-emption works with the FiberScheduler. Let's say I create 100.000 fibers that all run long-runners (such as calculating fibonacci(100)). Now I start another fiber that just prints "hello world" to the console. So it's a short runner. When can I expect "hello world" to appear on the console?

a. Will take a long time in case fibonacci(100) never does any yield. b. The FiberScheduler will do a yield periodically. So "hello world" will be displayed in not so long time c. I need to do a yield from within the fibonacci function here and then for "hello world" to be displayed in not so long time

Just for my understanding ...
Thanks, Bienlein

Reply via email to