Oh, my GoD! Goroutines on D

Russel Winder russel at winder.org.uk
Tue May 26 09:02:54 UTC 2020


On Tue, 2020-05-26 at 01:27 +0000, Mathias LANG via Digitalmars-d wrote:
[…]
> 
> This is a problem that's of interest to me as well, and I've been 
> working on this for a few months (on and off).
> I had to eventually ditch `std.concurrency` because of some 
> design decisions that made things hard to work with.
[…]

I am fairly sure std.parallelism is a better place to get threadpools, tasks,
scheduling, work stealing, etc. However it is all packaged with a view to
implementing SMP parallelism in D.

I haven't been following, but many others including Vibe.d have implemented
either fibres and yield or tasks/threadpools and channels – the bit missing
from std.parallelism since it isn't needed for SMP parallelism, but is if you
take the tasks and threadpools out of that context.

What has happened in Rust, and to a great extent in the JVM arena is that
there has been an implementation of fibres/yield, futures and async, and/or
task and threadpool that has been centralised and then everyone else has
evolved to use it rather than having multiple implementations of all the
ideas. In the JVM milieu there is still a lot of NIH replication but then they
have lots of money and resources.

Strategically if there were to be one set of Dub packages doing this low level
stuff that people worked on that then everyone else used that would be good.
Then the question is whether to deprecate std.parallelism and rebuild it based
on the new low level code. Answer yes. Perhaps the std.parallelism stuff could
actually provide a basis for some of this low level code along with vibe.core
stuff and mayhap the Mecca stuff. My feeling is the time for everyone
implements their own is long past, it is time for all to join in on a standard
for set of tools for D. This includes removing the Fibres stuff from
std.concurrency.
 
So yes I am up for contributing.

-- 
Russel.
===========================================
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...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20200526/789536b7/attachment-0001.sig>


More information about the Digitalmars-d mailing list