comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Timeouts in Ada
Date: Thu, 17 Jul 2014 12:27:01 -0700
Date: 2014-07-17T12:27:01-07:00	[thread overview]
Message-ID: <lq9825$t2c$1@dont-email.me> (raw)
In-Reply-To: <8e1281ee-79b4-4878-91db-6d0a65c96013@googlegroups.com>

On 07/17/2014 11:12 AM, Adam Beneschan wrote:
>
> If the entry is *selected* right away, but the rendezvous takes an hour (i.e.
> the body of the ACCEPT statement just sits there), then yes, the code will
> wait.  Normally, a rendezvous that could wait an hour shouldn't be written.
> I think the idea is that rendezvous should be completed fairly quickly.

A long rendezvous seems perfectly acceptable to me in some cases. Consider an 
external action that may take a long time, several tasks that need to have this 
external action taken, and multiple such actions must occur sequentially. I 
would almost certainly implement this as a task entry, even though the task 
would be passive, since potentially blocking operations are prohibited in a 
protected operation.

Sandén's FMS problem has an example of this: there is a single device for 
transporting jobs between the storage bins and the work floor. Transporting a 
single job may take minutes. If multiple jobs all need transport, they must be 
transported sequentially, and the last one transported may have to wait many 
multiples of the time for a single transportation.

Personally, I think protected objects were a mistake. Formalizing the concept of 
a passive task would have been better than inventing a new concept, with a new 
reserved word, with unnecessary and impractical restrictions.

-- 
Jeff Carter
"You a big nose have it."
Never Give a Sucker an Even Break
107


  reply	other threads:[~2014-07-17 19:27 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17  5:18 Timeouts in Ada NiGHTS
2014-07-17  7:08 ` Simon Wright
2014-07-17  8:35   ` NiGHTS
2014-07-21 23:34   ` Randy Brukardt
2014-07-22  1:11     ` Shark8
2014-07-22  7:39       ` J-P. Rosen
2014-07-22  8:31         ` Simon Wright
2014-07-22 21:52       ` Randy Brukardt
2014-07-17  7:38 ` J-P. Rosen
2014-07-17  8:40   ` NiGHTS
2014-07-17 10:00     ` J-P. Rosen
2014-07-17 19:27   ` Jeffrey Carter
2014-07-17 19:51     ` J-P. Rosen
2014-07-17 20:52       ` Jeffrey Carter
2014-07-17 20:29     ` Adam Beneschan
2014-07-17 20:52       ` J-P. Rosen
2014-07-21 23:44         ` Randy Brukardt
2014-07-17 20:43     ` Jeffrey Carter
2014-07-21 23:37   ` Randy Brukardt
2014-07-17  7:42 ` Dmitry A. Kazakov
2014-07-17  8:59   ` NiGHTS
2014-07-17  9:48     ` Dmitry A. Kazakov
2014-07-17 17:10       ` NiGHTS
2014-07-17 20:45         ` Dmitry A. Kazakov
2014-07-17 16:12 ` Adam Beneschan
2014-07-17 16:46   ` NiGHTS
2014-07-17 17:11     ` Simon Wright
2014-07-17 17:58       ` NiGHTS
2014-07-17 19:02         ` Jeffrey Carter
2014-07-17 18:58       ` Jeffrey Carter
2014-07-17 18:12     ` Adam Beneschan
2014-07-17 19:27       ` Jeffrey Carter [this message]
2014-07-17 18:56     ` Jeffrey Carter
2014-07-23 22:37     ` Robert A Duff
2014-07-24  9:23       ` AdaMagica
2014-07-24 15:37         ` Robert A Duff
2014-07-25  5:16           ` Randy Brukardt
2014-07-25  9:11           ` AdaMagica
2014-07-25 16:15             ` Brad Moore
2014-07-25 16:34             ` Dmitry A. Kazakov
2014-07-17 19:27 ` Jeffrey Carter
replies disabled

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