comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org>
Subject: Re: Basic question about select
Date: Wed, 28 Apr 2010 14:00:50 -0700
Date: 2010-04-28T14:00:50-07:00	[thread overview]
Message-ID: <hra886$nku$1@tornado.tornevall.net> (raw)
In-Reply-To: <1p2m3s7y70lsa$.79fl3we9edva$.dlg@40tude.net>

Dmitry A. Kazakov wrote:
> 
> It waits 10s and then assigns Q to Status. But if within these 10s + the
> time needed to assign Status, the task PID accepts Call, then the sequence
> introduced by "then abort" is aborted, Call is performed, and finally, P is
> assigned to Status.

That's a good explanation for the OP.

Technically, though, it isn't quite true: if the entry call *completes* then the 
abortable part (after "then abort") is aborted: "If the triggering_statement 
completes other than due to cancellation, the abortable_part is aborted". The 
abortable part only begins execution if the entry call is queued, either 
immediately or by requeue-with-abort.

If the abortable part completes, then it attempts to cancel the entry call, even 
if it has been "selected" (is no longer queued but has not completed).

For a timed entry call, no attempt is made to cancel the entry call if the entry 
has been "selected". This difference in semantics may be why this code uses 
asynchronous transfer of control rather than a timed entry call.

But I doubt it.

-- 
Jeff Carter
"From this day on, the official language of San Marcos will be Swedish."
Bananas
28



  reply	other threads:[~2010-04-28 21:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28 18:16 Basic question about select John Wilkinson
2010-04-28 18:36 ` Dmitry A. Kazakov
2010-04-28 21:00   ` Jeffrey R. Carter [this message]
2010-04-28 22:41     ` Dmitry A. Kazakov
2010-04-29  0:20       ` Jeffrey R. Carter
2010-04-29  2:16         ` Adam Beneschan
2010-04-29  4:25           ` Jeffrey R. Carter
2010-04-29 17:27             ` Adam Beneschan
2010-04-29 18:42               ` Jeffrey R. Carter
2010-04-29  0:47       ` Jeffrey R. Carter
2010-04-29  7:37         ` Dmitry A. Kazakov
replies disabled

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