From: Egil Harald Hoevik <egil.harald.hoevik@kongsberg.com>
Subject: Re: Using 'Access in a limited type declaration as an initialization hook
Date: Thu, 09 Aug 2001 10:53:28 +0200
Date: 2001-08-09T10:53:28+02:00 [thread overview]
Message-ID: <3B724F88.23104A8A@kongsberg.com> (raw)
In-Reply-To: 3B71E616.EEACBB6D@delete_this_anti_spam_part.lmco.com
"Michael P. Card" wrote:
>
<snip>
>
An even more interesting and useful issue, is the ability to hook a task
to an object in more or less the same way:
type Object;
task type thread( Self : access Object );
type Object is
record
t : thread( Object 'access );
seconds : integer := 0;
end record;
...
task body thread is
begin
loop
Self.seconds := Self.seconds + 1;
delay 1.0;
end loop;
end thread;
That way, the task is hooked up to the object, and can access the
object's
members.
~egilhh
--
"What I seek is to serve, with my feeble capacity,
truth and justice at the risk of pleasing no-one."
Albert Einstein.
prev parent reply other threads:[~2001-08-09 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-09 1:23 Using 'Access in a limited type declaration as an initialization hook Michael P. Card
2001-08-09 8:53 ` Egil Harald Hoevik [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox