Oh, my GoD! Goroutines on D

Jin nin-jin at ya.ru
Mon May 25 16:41:06 UTC 2020


On Tuesday, 19 May 2020 at 09:15:24 UTC, Seb wrote:
> On Sunday, 17 May 2020 at 15:17:44 UTC, Russel Winder wrote:
>> On Sat, 2020-05-16 at 20:06 +0000, mw via Digitalmars-d wrote:
>>> On Tuesday, 29 March 2016 at 17:10:02 UTC, Jin wrote:
>>> > http://wiki.dlang.org/Go_to_D
>>> 
>>> Any performance comparison with Go? esp. in real word 
>>> scenario?
>>> 
>>> Can it easily handle hundreds of (go)routines?
>>
>> Seems to have been created four years ago and then left 
>> fallow. Perhaps it should be resurrected  and integrated into 
>> Phobos? Or left as a package in the Dub repository?
>
> FYI: channels are also part of vibe-core since a while:
>
> https://github.com/vibe-d/vibe-core/blob/master/source/vibe/core/channel.d

Yes. But it uses mutex. My implementation is wait-free 
(https://en.wikipedia.org/wiki/Non-blocking_algorithm#Wait-freedom). All threads can easy and fast write and read without any locking. So every queue is 1-provider-1-consumer. But Input and Output channels is roundrobin list of queues. You can found some diagrams there: https://github.com/nin-jin/go.d/blob/master/readme.drawio.svg


More information about the Digitalmars-d mailing list