Contents Index Previous Next
9.7.2 Timed Entry Calls
1
[A
timed_entry_call
issues an entry call that is cancelled if the call (or a requeue-with-abort
of the call) is not selected before the expiration time is reached.
{time-out:
See timed_entry_call} ]
Syntax
2
timed_entry_call
::=
select
entry_call_alternative
or
delay_alternative
end select;
3
entry_call_alternative
::=
entry_call_statement [
sequence_of_statements]
Dynamic Semantics
4
{execution (timed_entry_call)
[partial]} For the execution of a
timed_entry_call,
the
entry_name and the actual parameters
are evaluated, as for a simple entry call (see
9.5.3).
The expiration time (see
9.6) for the call is determined
by evaluating the
delay_expression
of the
delay_alternative; the entry call
is then issued.
5
If the call is queued (including due to a requeue-with-abort),
and not selected before the expiration time is reached, an attempt to
cancel the call is made. If the call completes due to the cancellation,
the optional sequence_of_statements
of the delay_alternative is executed;
if the entry call completes normally, the optional sequence_of_statements
of the entry_call_alternative is
executed.
5.a
Ramification: The fact
that the syntax calls for an entry_call_statement
means that this fact is used in overload resolution. For example, if
there is a procedure X and an entry X (both with no parameters), then
"select X; ..." is legal, because overload resolution knows
that the entry is the one that was meant.
Examples
6
Example of a
timed entry call:
7
select
Controller.Request(Medium)(Some_Item);
or
delay 45.0;
-- controller too busy, try something else
end select;
Wording Changes from Ada 83
7.a
This clause comes before the one
for Conditional Entry Calls, so we can define conditional entry calls
in terms of timed entry calls.
Contents Index Previous Next Legal