On Sunday, 21 September 2014 at 09:06:57 UTC, Ola Fosheim Grostad
wrote:
On Sunday, 21 September 2014 at 08:24:46 UTC, Dmitry Olshansky
wrote:
Not spontaneously :)
You'd have to cast to shared and back, and then you are on
your own.
Fiber is thread-local, shared(Fiber) isn't.
That will have to change if Go is a target. To get full load
you need to let fibers move freely between threads I think. Go
also check fiber stack size... But maybe Go should not be
considered a target.
It doesn't ring a bell to me. For several reasons:
1) Go doesn't seem to be a target right now. There has been
certain examples that D is capable to beat Go in its own domain
(see Atila MQTT broker articles). It may change later but there
has been no experimental confirmations that their approach is
better by design.
2) For good CPU load distribution moving of task is likely to be
needed indeed but it is not necessarily the same thing as moving
fibers and definitely not all need to be moved. I like that
vibe.d goes forward with this by defining own `Task` abstraction
on top of fibers. Thus this is something that belong to specific
task scheduler/manager and not basic Fiber implementation.