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.68.225.193 with SMTP id rm1mr1167668pbc.2.1446122316630; Thu, 29 Oct 2015 05:38:36 -0700 (PDT) X-Received: by 10.50.22.9 with SMTP id z9mr40537ige.1.1446122316601; Thu, 29 Oct 2015 05:38:36 -0700 (PDT) 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!i2no393533igv.0!news-out.google.com!fs1ni1928igb.0!nntp.google.com!i2no568651igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 29 Oct 2015 05:38:36 -0700 (PDT) In-Reply-To: <1qrjm5vaptsw$.14uwmxveagjrt$.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=104.169.174.83; posting-account=Ies7ywoAAACcdHZMiIRy0M84lcJvfxwg NNTP-Posting-Host: 104.169.174.83 References: <3dd39b8d-d1ad-43b0-bd20-b5248d0aeff8@googlegroups.com> <1qrjm5vaptsw$.14uwmxveagjrt$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <597832aa-6b77-40ac-a0db-ce43be348299@googlegroups.com> Subject: Re: Asynchronicity and Promises From: brbarkstrom@gmail.com Injection-Date: Thu, 29 Oct 2015 12:38:36 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:28112 Date: 2015-10-29T05:38:36-07:00 List-Id: On Wednesday, October 28, 2015 at 2:46:37 PM UTC-4, Dmitry A. Kazakov wrote: > > > There's an interesting blog on Asynchronicity and Promises at > [...] > > I think we've had some discussion in other e-mail threads here. > > As far as I've been able to follow the discussion, we don't seem > > to have settled the issue about how Ada could handle contract > > "Promises" - although it looked like we had begun to converge > > on some useful potential approaches. > > Ada had this since Ada 95 in the form of a protected object. Protected > object's state is waitable. That gives you everything you need to design > things described. They are not 100% asynchronous because the caller waits > for the callee at some point anyway. > > As a side note, usefulness of this approach is questionable. I can judge, > because this sort of objects and asynchronous execution has been used in > the middleware for 20+ years. A lot of use cases to be sure. It is > certainly neither natural nor composable and works at the low level only. > To be honest, I know no better way, but you must clearly understand > limitations of the approach, e.g. a total lack of scalability. Ada's > concurrency model has much more to offer and at the higher level as well. > > P.S. What wonders me is that the author is seemingly unaware of 30+ years > of OS having asynchronous I/O and waitable objects. Just google for Windows > GetOverlappedResult. > > -- Thanks for the response. I'll take a look. Bruce B.