comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Asynchronicity and Promises
Date: Wed, 28 Oct 2015 19:46:32 +0100
Date: 2015-10-28T19:46:32+01:00	[thread overview]
Message-ID: <1qrjm5vaptsw$.14uwmxveagjrt$.dlg@40tude.net> (raw)
In-Reply-To: 3dd39b8d-d1ad-43b0-bd20-b5248d0aeff8@googlegroups.com

On Wed, 28 Oct 2015 08:33:56 -0700 (PDT), brbarkstrom@gmail.com wrote:

On Wed, 28 Oct 2015 08:33:56 -0700 (PDT), in comp.lang.ada you 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.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2015-10-28 18:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 15:33 Asynchronicity and Promises brbarkstrom
2015-10-28 18:46 ` Dmitry A. Kazakov [this message]
2015-10-29 12:38   ` brbarkstrom
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox