From: NCOHEN@IBM.COM (Norman Cohen)
Subject: Two Questions on tasking
Date: 3 Apr 89 13:31:52 GMT [thread overview]
Message-ID: <040389.093152.ncohen@ibm.com> (raw)
Ref: INFO-ADA Digest Volume 89 Issue 96 (Sat, Apr 1, 1989) Item #5
Bob Hathaway writes:
>According to section 9.3.3, if any child task does not have a handler
>for a raised exception, the exception TASKING_ERROR is propagated to the
>master upon conclusion of the activation of all sibling tasks and is
>propagated to the master only once for any number of concluded child
>tasks. What is being asserted above?
Paragraph 9.3(3) refers to exceptions arising during the ACTIVATION of
a task. Activation is defined in 9.3(1) as follows:
The initial part of this execution [of a task body] is called the
_activation_ of the task object, and also that of the designated
task; it consists of of the elaboration of the declarative part, if
any, of the task body.
To understand the rules given in paragraphs 9.3(2) and 9.3(3), consider
the following example:
declare
A, B : Some_Task_Type;
C : array (1 .. 10) of Some_Task_Type;
begin
-- (*)
S;
end;
(Some_Task_Type is some task type.) Twelve task objects (A, B and
C(1) through C(10)) are declared in the declarative part of the block
statement. The following events occur:
1. After the task executing the block statement reaches the point
marked (*), the task pauses, and twelve new tasks are now created
to be designated by the twelve declared task objects.
2. Each of these twelve new tasks asynchronously executes the
declarative part of the Some_Task_Type task body (or dies trying).
3. THE TWELVE NEW TASKS AND THE TASK EXECUTING THE BLOCK STATEMENT ALL
SYNCHRONIZE. If one or more of the twelve new tasks died trying to
elaborate its declarative part (i.e., raised an exception),
TASKING_ERROR is raised (once) in the block statement, at point (*).
Otherwise, after synchronizing, the twelve new tasks and the task
executing the block statement begin asynchronous execution (with
execution of the block statement resuming at point (*)).
If any of the twelve new tasks raises an unhandled exception AFTER this
synchronization point, no exception is propagated to the task executing
the block statement.
Norman Cohen
next reply other threads:[~1989-04-03 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1989-04-03 13:31 Norman Cohen [this message]
-- strict thread matches above, loose matches on Subject: below --
1989-04-03 11:05 Two Questions on Tasking Mats Weber
1989-03-31 15:11 Two Questions on tasking Mats Weber
1989-03-31 21:42 ` Bob Hathaway
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox