Annotated Ada Reference ManualLegal Information
Contents   Index   References   Search   Previous   Next 

 E.4.1 Asynchronous Remote CallsPragma Asynchronous

1/3
{AI05-0229-1} [This subclause introduces the aspect pragma Asynchronous which can be specified to allow allows a remote subprogram call to return prior to completion of the execution of the corresponding remote subprogram body.] 
Paragraphs 2 through 7 were deleted. 

Syntax

2/3
{AI05-0229-1} The form of a pragma Asynchronous is as follows: 
3/3
  pragma Asynchronous(local_name);

Legality Rules

4/3
{AI05-0229-1} The local_name of a pragma Asynchronous shall denote either: 
5/3
One or more remote procedures; the formal parameters of the procedure(s) shall all be of mode in;
6/3
The first subtype of a remote access-to-procedure type; the formal parameters of the designated profile of the type shall all be of mode in;
7/3
The first subtype of a remote access-to-class-wide type. 

Static Semantics

8/3
{AI05-0229-1} For a remote procedure, the following language-defined representation aspect may be specified: A pragma Asynchronous is a representation pragma. When applied to a type, it specifies the type-related asynchronous aspect of the type. 
8.1/3
  Asynchronous
The type of aspect Asynchronous is Boolean. If directly specified, the aspect_definition shall be a static expression. If not specified, the aspect is False.
8.a/3
Aspect Description for Asynchronous: Remote procedure calls are asynchronous; the caller continues without waiting for the call to return.
8.2/3
  {AI05-0229-1} For a remote access type, the following language-defined representation aspect may be specified: 
8.3/3
  Asynchronous
The type of aspect Asynchronous is Boolean. If directly specified, the aspect_definition shall be a static expression. If not specified (including by inheritance), the aspect is False. 

Legality Rules

8.4/3
  {AI05-0229-1} If aspect Asynchronous is specified for a remote procedure, the formal parameters of the procedure shall all be of mode in.
8.5/3
  {AI05-0229-1} If aspect Asynchronous is specified for a remote access type, the type shall be a remote access-to-class-wide type, or the type shall be a remote access-to-procedure type with the formal parameters of the designated profile of the type all of mode in. 

Dynamic Semantics

9/3
{AI05-0229-1} A remote call is asynchronous if it is a call to a procedure, or a call through a value of an access-to-procedure type, for to which aspect a pragma Asynchronous is True applies. In addition, if aspect a pragma Asynchronous is True for applies to a remote access-to-class-wide type, then a dispatching call on a procedure with a controlling operand designated by a value of the type is asynchronous if the formal parameters of the procedure are all of mode in

Implementation Requirements

10
Asynchronous remote procedure calls shall be implemented such that the corresponding body executes at most once as a result of the call. 
10.a
To be honest: It is not clear that this rule can be tested or even defined formally. 

Extensions to Ada 2005

10.b/3
{AI05-0229-1} Aspect Asynchronous is new; pragma Asynchronous is now obsolescent. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe