comp.lang.ada
 help / color / mirror / Atom feed
From: claudio@ethz.UUCP (Claudio Nieder)
Subject: Re: can not abort allocated tasks
Date: Mon, 12-Oct-87 15:54:24 EDT	[thread overview]
Date: Mon Oct 12 15:54:24 1987
Message-ID: <211@bernina.UUCP> (raw)
In-Reply-To: 7586@steinmetz.steinmetz.UUCP

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
 

  parent reply	other threads:[~1987-10-12 19:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-10-09 15:22 can not abort allocated tasks nico nieh
1987-10-12 13:27 ` fitch
1987-10-12 15:53 ` Jonathan P. Biggar
1987-10-12 17:37 ` Jeff Bartlett
1987-10-12 19:54 ` Claudio Nieder [this message]
1987-10-12 21:17 ` Michael Murphy
replies disabled

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