Popis: |
The execution of an Ada program consists of the execution of one or more tasks. Each task represents a separate thread of control that proceeds independently and concurrently between the points where it interacts with other tasks. The various forms of task interaction are described in this clause, and include: the activation and termination of a task; a call on a protected subprogram of a protected object, providing exclusive read-write access, or concurrent read-only access to shared data; a call on an entry, either of another task, allowing for synchronous communication with that task, or of a protected object, allowing for asynchronous communication with one or more other tasks using that same protected object; a timed operation, including a simple delay statement, a timed entry call or accept, or a timed asynchronous select statement (see next item); an asynchronous transfer of control as part of an asynchronous select statement, where a task stops what it is doing and begins execution at a different point in response to the completion of an entry call or the expiration of a delay; an abort statement, allowing one task to cause the termination of another task. In addition, tasks can communicate indirectly by reading and updating (unprotected) shared variables, presuming the access is properly synchronized through some other kind of task interaction. |