Table of Contents
In Understanding Basic Tasking Concepts the concept of an internal task was introduced. An internal task is created by a statement that initiates a single procedure within a program. The capability of initiating internal tasks exists only in WFL and ALGOL.
WFL and ALGOL share a similar type of program structure. Both languages allow you to create blocks that can include declarations of objects for use within the block. Both languages allow you to nest blocks within other blocks. Both languages allow nested blocks to use objects declared in the blocks they are nested within. These objects are referred to as global objects.
Globally declared objects can be used to allow an internal task to communicate with its parent or with other internal tasks of the same parent. Even widely separated members of a process family can communicate with each other by way of global objects. For example, sibling or cousin tasks could communicate, or a task could communicate with an ancestor. For an introduction to the possible relationships in a process family, refer to Understanding Basic Tasking Concepts.
Processes can communicate through a particular global object only if the processes meet both the following rules:
-
Each process is one of the following: the process that executed the declaration of the global object, or an internal task of that process, or an internal task of one of these internal tasks, and so on.
-
Each process must have been created by initiating a procedure that falls within the scope of the declaration of the global object.
The scope of a declaration consists of all the blocks that have access to the object declared. Conversely, the addressing environment of a block consists of all the objects that can be used by statements in the block. The following subsections discuss the scope of declarations in WFL and ALGOL, and give examples of related processes that communicate through global objects.
Global objects can also be used in SHAREDBYALL libraries to provide communication between unrelated processes. The use of global objects in libraries is discussed in Using Libraries.

