From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.141.102 with SMTP id rn6mr15591513pab.26.1455926033342; Fri, 19 Feb 2016 15:53:53 -0800 (PST) X-Received: by 10.182.101.196 with SMTP id fi4mr226852obb.4.1455926033303; Fri, 19 Feb 2016 15:53:53 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!hb3no7309709igb.0!news-out.google.com!kr2ni1251igb.0!nntp.google.com!ok5no3842822igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 19 Feb 2016 15:53:52 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=68.145.219.148; posting-account=lzqe5AoAAADHhp_gregSufVhvwu22fBS NNTP-Posting-Host: 68.145.219.148 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Asynchronous channels in Ada From: Brad Moore Injection-Date: Fri, 19 Feb 2016 23:53:53 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:29567 Date: 2016-02-19T15:53:52-08:00 List-Id: On Friday, February 19, 2016 at 2:51:35 PM UTC-7, Jeffrey R. Carter wrote: > On 02/19/2016 02:02 PM, Hadrien Grasland wrote: > > > > On the other hand, asynchronous "buffered" channels are really a neat > > abstraction for producer-consumer problems, and I regularly end up facing a > > problem where I wish I had some in Ada. I'm pretty convinced that one could > > quite easily build a library-based Ada abstraction which offers similar > > functionality, but better. Before trying it myself, though, I'd like to check > > out here if you know of an open-source Ada project which has already > > implemented something similar. > > > > Anyone is aware of something like this that would already exist in the wild? > > For Ada 12, there are synchronous queues (ARM A.18.27-29). > > http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-A-18-27.html > > If you use a language supported by more than one compiler vendor, the PragmARCs > (both for ISO/IEC 8652:1995 and ISO/IEC 8652:2007) have protected queues, both > bounded and unbounded: > > https:/pragmada.x10hosting.com/ > > https://github.com/jrcarter/PragmARC Probably the synchronous queues of Ada 2012 is what you want, but if you are looking for something different, another alternative that provides portability across Ada 2005 or later, you might be interested in dequesterity https://sourceforge.net/projects/dequesterity/ It has various flavours of synchronous (and non-synchronous queues), including remote queues for distributed computing. The synchronous passive buffers are likely the closest fit from the other dequesterity buffer types, based on your description. Brad