comp.lang.ada
 help / color / mirror / Atom feed
From: Martyn Pike <usenet@embeddedconsultinguk.com>
Subject: Re: Example question
Date: Sun, 26 Oct 2014 16:53:16 +0000
Date: 2014-10-26T16:53:16+00:00	[thread overview]
Message-ID: <544d26ff$0$14265$c00b7f07@94.232.116.90> (raw)
In-Reply-To: <m2j529$o1b$1@dont-email.me>

On 26/10/2014 15:46, J-P. Rosen wrote:
> Le 26/10/2014 15:18, Martyn Pike a écrit :
>>> Tutorial says "If calls to both entries are already pending, one will
>>> be accepted non-deterministically." what does that mean? If calls are
>>> pending on bith entries it might happend that Shutdown is accepted and
>>> exits in which case thats not good solution at all
>>>
>>>
>>
>> It basically means exactly what you said.  If calls are pending on both
>> entries then it is not deterministic as to which one will be processed
>> first.
> No. "one of them is selected according to the entry queuing policy in
> effect" (9.7.1(16))
>
> It was never non deterministic. Implementation defined in previous
> versions of the language.
>

Ok - the order cannot be assumed or ascertained by the order of the 
select statements in the source code.  I think that's what the OP is 
questioning.

>> If you want deterministic behaviour then in my opinion this is where
>> protected objects should be used.  Particularly if you absolutely must
>> check for the existence of a Shutdown event before checking for a
>> Recalculate event.
> If you tell what kind of deterministic behaviour you want, it is easy to
> write the expected behaviour with rendezvous.
>

Agreed it may be easy but my personal preference is to use protected 
objects.

  reply	other threads:[~2014-10-26 16:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-26 13:27 Example question compguy45
2014-10-26 14:18 ` Martyn Pike
2014-10-26 15:46   ` J-P. Rosen
2014-10-26 16:53     ` Martyn Pike [this message]
2014-10-26 14:21 ` Shark8
2014-10-26 15:42   ` Simon Wright
2014-10-26 15:48   ` Robert A Duff
2014-10-26 14:33 ` Niklas Holsti
replies disabled

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