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.win...@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to