comp.lang.ada
 help / color / mirror / Atom feed
* Task activation
@ 2011-12-21 11:58 tonyg
  2011-12-21 12:27 ` tonyg
  2011-12-21 12:35 ` Niklas Holsti
  0 siblings, 2 replies; 17+ messages in thread
From: tonyg @ 2011-12-21 11:58 UTC (permalink / raw)



I seem to have a problem with task activation

I have a task which I am using to launch other tasks. This task is
activating fine. I have three task pointers in a package spec, when I
want to activate the task I declare a task of the necessary type
inside a procedure and point the access variable to the task. However
it does not seem to get past activation of the task. I cannot see the
reason for this.



^ permalink raw reply	[flat|nested] 17+ messages in thread
* task activation
@ 1999-11-20  0:00 Matthew Heaney
  1999-11-21  0:00 ` Jean-Pierre Rosen
  1999-11-22  0:00 ` Robert A Duff
  0 siblings, 2 replies; 17+ messages in thread
From: Matthew Heaney @ 1999-11-20  0:00 UTC (permalink / 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/




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-12-22  8:26 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
1999-11-20  0:00 task activation Matthew Heaney
1999-11-21  0:00 ` 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         ` Simon Wright
1999-12-06  0:00         ` Robert A Duff
1999-12-06  0:00       ` Robert Dewar

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