Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!mcvax!cernvax!ethz!claudio From: claudio@ethz.UUCP (Claudio Nieder) Newsgroups: comp.lang.ada Subject: Re: can not abort allocated tasks Message-ID: <211@bernina.UUCP> Date: Mon, 12-Oct-87 15:54:24 EDT Article-I.D.: bernina.211 Posted: Mon Oct 12 15:54:24 1987 Date-Received: Wed, 14-Oct-87 04:48:40 EDT References: <7586@steinmetz.steinmetz.UUCP> Reply-To: claudio@ifi.ethz.chunet Organization: ETH Zuerich, Switzerland Lines: 30 In article <7586@steinmetz.steinmetz.UUCP> nieh@moose.steinmetz (nico nieh) writes: >What I wanted to do is to be able to abort a task which >is activated by using the allocator. > >... the abort statement only takes task_names not pointers to task. So you have to dereference the pointer ... procedure TASK_REFERENCE is task type TASK_TYPE; type TASK_POINTER is access TASK_TYPE; TASK_INSTANCE : TASK_POINTER; task body TASK_TYPE is begin null; -- may be a never ending story ... end TASK_TYPE; begin TASK_INSTANCE := new TASK_TYPE; abort TASK_INSTANCE.all; end TASK_REFERENCE; ... and your program will be accepted by the compiler. Harry