[Ada Information Clearinghouse]
Ada '83 Rationale, Sec 13.4: Packages and Tasks

"Rationale for the Design of the
Ada® Programming Language"

[Ada '83 Rationale, HTML Version]

Copyright ©1986 owned by the United States Government. All rights reserved.
Direct inquiries to the Ada Information Clearinghouse at adainfo@sw-eng.falls-church.va.us.

CHAPTER 13: Tasking

13.4 Packages and Tasks

We conclude by emphasizing one strong distinction between packages and tasks, despite their lexical similarity. The overall concept is that a package is passive and provides the means for visibility control and structuring, whereas a task is active and provides the means for parallelism and synchronization.

In order to emphasize that a package is the main structuring tool, a task cannot be generic, cannot be a library unit, and cannot appear in a use clause.

A general subsystem might thus be a (possibly generic) package containing tasks. This general structure has the advantage of giving good control over the facilities provided. Thus protocols on the use of entries may be enforced by encapsulating their calls in a procedure.


NEXTPREVIOUSUPTOCINDEX
Address any questions or comments to adainfo@sw-eng.falls-church.va.us.