comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: task activation
Date: 1999/11/20
Date: 1999-11-20T00:00:00+00:00	[thread overview]
Message-ID: <383733d3_1@news1.prserv.net> (raw)

It is my understanding that a task "activates" when you hit the begin 
part of the block in which the task is declared:

procedure Main is
  task O is ...
  task body O is ...;
begin
  <whatever>
end Main;

In this example, task O activates when procedure Main reaches its begin.

Now, suppose we wanted to activate the task earlier than that.  Let's
declare O in a nested package:

procedure Main is
  package P is
    task O is ...;
  end;
  package body P is
    task body O is ...;
  end;
begin
  <whatever>
end;


Does task O activate when

1) the elaboration of nested package P completes (hit the begin part of
P's body); that is, prior to hitting the begin part of Main.  Or,

2) no, the nesting doesn't matter, and O still activates when you hit
the begin part of procedure Main.


Another question: suppose package P is a library level package (and
therefore task O is a library level task).  Does O get activated when

1) you hit the begin part of P's body; that is, prior to hitting the
begin part of Ada main subprogram Main?  Or,

2) no, the library-levelness doesn't matter, and O still is activated
when you hit the begin part of the Ada main.


Thanks,
Matt

--
Time and again the nation's courts have ruled that creationism, as a
religious dogma, cannot be taught in science classes. Now, creationists
are advancing a new tactic: eliminating the teaching of evolution and
other sciences that complement evolution, such as geology, paleontology,
and biological anthropology. By doing so, they are not only endangering
church-state separation but also seriously jeopardizing the science
education of future generations.

http://www.campusfreethought.org/sos/




             reply	other threads:[~1999-11-20  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-20  0:00 Matthew Heaney [this message]
1999-11-21  0:00 ` task activation Jean-Pierre Rosen
1999-11-22  0:00 ` Robert A Duff
1999-11-22  0:00   ` Matthew Heaney
1999-11-23  0:00     ` Mats Weber
1999-11-23  0:00       ` Matthew Heaney
1999-12-02  0:00   ` Ehud Lamm
1999-12-03  0:00     ` Simon Wright
1999-12-06  0:00       ` Robert Dewar
1999-12-06  0:00       ` Robert Dewar
1999-12-06  0:00         ` Robert A Duff
1999-12-06  0:00         ` Simon Wright
  -- strict thread matches above, loose matches on Subject: below --
2011-12-21 11:58 Task activation tonyg
2011-12-21 12:27 ` tonyg
2011-12-21 12:31   ` AdaMagica
2011-12-21 12:35 ` Niklas Holsti
2011-12-22  8:26   ` tonyg
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox