9.7.2 Timed Entry Calls

From OC Systems Wiki!
Jump to: navigation, search

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.

Syntax

timed_entry_call ::=
    select
         entry_call_alternative
    or
         delay_alternative
    end select;

entry_call_alternative ::=
    entry_call_statement [sequence_of_statements]

Dynamic Semantics

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.

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.

Examples

Example of a timed entry call:

select
    Controller.Request(Medium)(Some_Item);
or
    delay 45.0;
    --  controller too busy, try something else
end select;

Copyright © 1992,1993,1994,1995 Intermetrics, Inc.
Copyright © 2000 The MITRE Corporation, Inc. Ada Reference Manual