Oh, my GoD! Goroutines on D

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 1 01:01:40 PDT 2016


On Wed, 2016-03-30 at 17:01 +0000, Casey Sybrandy via Digitalmars-d
wrote:
> On Wednesday, 30 March 2016 at 15:50:47 UTC, Jin wrote:
> > 
> > This is java bloatware. :-(
> I've never used the library so I can't comment on that, but the 
> actual data structure/algorithm is really pretty simple.  The 
> core components are atomic counters and a static array.  I think 
> it would be a good data structure for channels.

If I recollect correctly, the core data structure is a lock-free ring
buffer, and the parallelism "trick" the use of multicast with atomic
indexes. This works fine for the problem of creating a trading
framework, but I suspect the architecture is just too big for realizing
channels. In particular, the really important thing about channels over
(thread|process)-safe queues is the ability to select. I have no idea
how select is implemented on Windows but the classic Posix approach is
to use file descriptors to represent the queues and select or epoll
system calls to get the kernel to realize the select. As to how JCSP
does select on the JVM, I shall have to go and delve into the source
code…
 
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20160401/fd5064e3/attachment-0001.sig>


More information about the Digitalmars-d mailing list