comp.lang.ada
 help / color / mirror / Atom feed
* Aborting Tasks with abort command
@ 1996-07-10  0:00 Frank Schneider
  1996-07-10  0:00 ` James Rhodes
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Schneider @ 1996-07-10  0:00 UTC (permalink / raw)



Hello

My problem is that I can't abort a running task with the "abort" command.

The structure of the task looks like this:

task body test is 
 ....
 begin
   loop
  ...
   delay ...
    ...
   delay ...
   ...
   delay until ...
   end loop;
 end test;

"abort test" doesn't work. Without the delay commands it works pretty, but I
need the delays.
I use gnat 3.03 under LINUX. 
Can anybody help me? 

Greetings and thanks

Frank





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

* Re: Aborting Tasks with abort command
  1996-07-10  0:00 Aborting Tasks with abort command Frank Schneider
@ 1996-07-10  0:00 ` James Rhodes
  0 siblings, 0 replies; 2+ messages in thread
From: James Rhodes @ 1996-07-10  0:00 UTC (permalink / raw)



Frank Schneider <schneifr@iassnb.ias.uni-stuttgart.de> wrote:
>Hello
>
>My problem is that I can't abort a running task with the "abort" command.
>
>The structure of the task looks like this:
>
>task body test is 
> ....
> begin
>   loop
>  ...
>   delay ...
>    ...
>   delay ...
>   ...
>   delay until ...
>   end loop;
> end test;
>
>"abort test" doesn't work. Without the delay commands it works pretty, but I
>need the delays.
>I use gnat 3.03 under LINUX. 



I don't use GNAT myself, and my major experiance is in Ada83

A few qestions to start with:-

Do you have any other tasks running?

What are the relative priorities of any/all tasks and the main program?

What provision for synchronisation points have you made (to make sure
that all units get a piece of processing time), that is other delays
entry calls, accept statements ?



Depending on the exact set up you may end up with no time for the 
main program (or other task) to execute thereby being unable to
execute the abort.

Have you considered a new entry call to your task to trigger
either a terminate or simply exit the loop to allow the task to
die naturally?

'abort' is really for tasks that have gone haywire.

please note that I really don't know how the tasking model has
been updated in Ada95, and how this may affect things.



James.







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

end of thread, other threads:[~1996-07-10  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-10  0:00 Aborting Tasks with abort command Frank Schneider
1996-07-10  0:00 ` James Rhodes

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