From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,294f0e092c05555e X-Google-Attributes: gid103376,public From: James Rhodes Subject: Re: Aborting Tasks with abort command Date: 1996/07/10 Message-ID: <4s08fu$5tu@gcsin3.geccs.gecm.com>#1/1 X-Deja-AN: 167568499 references: <4rvo0d$vee@info4.rus.uni-stuttgart.de> content-type: text/plain; charset=us-ascii organization: GEC-Marconi mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 1.1N (Windows; I; 16bit) Date: 1996-07-10T00:00:00+00:00 List-Id: Frank Schneider 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.