Go 2, here we come!
russel at winder.org.uk
Mon Dec 10 06:03:58 UTC 2018
On Sun, 2018-12-09 at 18:57 +0000, Bienlein via Digitalmars-d wrote:
> On Wednesday, 5 December 2018 at 06:47:44 UTC, Russel Winder
> > Project Loom is really about bringing an evolution of Quasar
> > into the JVM so as to avoid all the hacking around that Quasar
> > currently has to do to work properly. I think this is a good
> > thing, and about time it happened.
> > GPars had all this stuff in 2008. :-)
> > GPars is now effectively a dead project.
> I'm not sure this is correct. From what I can see GPars had no
> green threads or something to mimic them like Kotlin Coroutines
> using fibers. Also, I can't see that GPars had continuations.
GPars is founded on Java concurrency so threadpools and fork/join. There was
no need for a green threads implementation independent of what was provided by
Java. The tasks of GPars are placed into a threadpool and are executed by
executors. As for continuations, I am less sure, the meaning of this term has
evolved over the years. What GPars does have is combinable futures.
> > Channels/lightweight processes/executors/threadpools is now the
> > norm in Rust as well.
> They had a module to have something like green threads before
> Rust turned 1.0 and then canceled it before Rust 1.0 was
> released. To my knowledge this module is still discontinued.
Almost everything to do with concurrency and parallelism was ripped out of
Rust, other than threads on the principle of keep the standard library small
and essential and put everything else into packages held on crates.io or in
GitHub repositories and brought in by Cargo.
There are many packages for concurrency and parallelism, but the main one is
futures. Actually the one you want is futures-preview for lots of silly
reasons. futures-preview is really quite good.
> It would be cool if D would get continuations. Then together with
> the existign solution for fibers you could greate something that
> matches Go's CSP-style concurrency or Kotlin's Coroutines.
Or Rust futures-preview, or GPars, or Quasar.
The future is combinable futures. And channels.
It was also the past, but somehow shared memory multi-threading had a couple
of decades of mindshare.
Dr Russel Winder t: +44 20 7585 2200
41 Buckmaster Road m: +44 7770 465 077
London SW11 1EN, UK w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the Digitalmars-d