From: "Jean-Pierre Rosen" <rosen@adalog.fr>
Subject: Re: Problem with tasks
Date: Wed, 25 Jul 2001 11:32:58 +0200
Date: 2001-07-25T11:32:58+02:00 [thread overview]
Message-ID: <9jm4kp$8ak$1@s1.read.news.oleane.net> (raw)
In-Reply-To: 3b5e887e.10671695@news.bt.es
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 899 bytes --]
"Carlos Aganzo" <carlos_aganzo@terra.es> a �crit dans le message news: 3b5e887e.10671695@news.bt.es...
> I need to create a new instance of the same task from itself,
> something like
>
> type acell is access cell;
>
> task body cell is
> anon: acell;
> begin
> anon := new cell;
> -- more code
> end cell;
>
>
> How could I do this?
A task type name designates the current instance within its own body, so that you can write:
abort cell;
to abort the current task. If you want to use it as the type name, just declare a subtype:
subtype Cell_Again is Cell; -- declaration must be outside body!
task body cell is
anon: acell;
begin
anon := new cell_Again;
-- more code
end cell;
--
---------------------------------------------------------
J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr
next prev parent reply other threads:[~2001-07-25 9:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-25 8:52 Problem with tasks Carlos Aganzo
2001-07-25 9:32 ` Jean-Pierre Rosen [this message]
2001-07-26 1:47 ` DuckE
2001-07-26 11:20 ` Carlos Aganzo
2001-07-26 16:03 ` Ted Dennison
2001-07-26 20:28 ` Ehud Lamm
2001-07-27 12:42 ` Ehud Lamm
2001-07-27 8:15 ` Carlos Aganzo
-- strict thread matches above, loose matches on Subject: below --
2004-09-04 8:57 Magik
2004-09-04 10:51 ` Frank J. Lhota
2004-09-04 11:02 ` Magik
2004-09-04 13:53 ` Pascal Obry
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox