On Fri, 2014-04-25 at 17:10 +, Kagamin via Digitalmars-d-learn
wrote:
> Fibers are more lightweight, they're not kernel objects. Threads
> are scheduled by kernel (usually). Fibers are better if you can
> get better resource usage with manual scheduling - less context
> switches, or don't wa
Fibers are more lightweight, they're not kernel objects. Threads
are scheduled by kernel (usually). Fibers are better if you can
get better resource usage with manual scheduling - less context
switches, or don't want to consume resources need by threads.
One key difference is that coroutines won't make your programs
run faster. It is a modelling mechanism that can simplify your
programs where you otherwise would have to implement a state
machine.
This is also my impression when I look at this code (see
http://www.99-bottles-of-beer.net/lang
On Friday, 18 April 2014 at 17:20:06 UTC, Nordlöw wrote:
Could someone please give some references to thorough
explainings on these latest concurrency mechanisms
Coroutines is nothing more than explicit stack switching.
Goroutines/fiber etc are abstractions that may be implemented
using corou
On 2014-04-18 13:20, "Nordlöw" wrote:
Could someone please give some references to thorough explainings on
these latest concurrency mechanisms
- Go: Goroutines
- Coroutines (Boost):
- https://en.wikipedia.org/wiki/Coroutine
-
http://www.boost.org/doc/libs/1_55_0/libs/coroutine/doc/html/cor
Correction: The references I gave _are_ theoretically thorough,
so I'm satisified with these for now. I'm however still
interested in the D-specific questions I asked.
Could someone please give some references to thorough explainings
on these latest concurrency mechanisms
- Go: Goroutines
- Coroutines (Boost):
- https://en.wikipedia.org/wiki/Coroutine
-
http://www.boost.org/doc/libs/1_55_0/libs/coroutine/doc/html/coroutine/intro.html
- D: core.thread.Fibe