From: "John G. Volan" <johnvolan@sprintmail.com>
Subject: Re: Task Discriminants & Arrays
Date: 1997/05/16
Date: 1997-05-16T00:00:00+00:00 [thread overview]
Message-ID: <337CEDE1.1BAB@sprintmail.com> (raw)
In-Reply-To: 337CE7E2.7B33@sprintmail.com
Sorry, I should have added the following:
John G. Volan wrote:
>
> Robert A Duff wrote:
>
> > Sorry, I don't get it. Are you saying "this is a mess"? Yeah, it is.
> > Shrug.
>
> No, no! I think this is a great solution!
Of course, you should wrap a nice abstraction around this. All that a
user should have to know is that there are these tasks and they are
accessible by id number:
package Processes is
type Process_Id_Type is range ...;
function Get_New_Process_Id return Process_Id_Type;
task type Process_Type
(Process_Id : Process_Id_Type := Get_New_Process_Id)
is
...
end Process_Type;
type Process_Access_Type is access all Process_Type;
function Get_Process
(Process_Id : in Process_Id)
return Process_Access_Type;
-- Note to clients: To get access to a Process_Type task, call
-- Get_Process. DO NOT declare any Process_Type tasks
-- of your own; this will result in Constraint_Error.
-- Elaboration of this package already results in the creation
-- of one task for each value in Process_Id_Type.
end Processes;
------------------------------------------------------------------------
Internet.Usenet.Put_Signature
(Name => "John G. Volan", Home_Email => "johnvolan@sprintmail.com",
Slogan => "Ada95: The World's *FIRST* International-Standard OOPL",
Disclaimer => "These opinions were never defined, so using them " &
"would be erroneous...or is that just nondeterministic now? :-) ");
------------------------------------------------------------------------
prev parent reply other threads:[~1997-05-16 0:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-05-13 0:00 Task Discriminants & Arrays Matthew Heaney
1997-05-13 0:00 ` Jeff Carter
1997-05-13 0:00 ` John G. Volan
1997-05-14 0:00 ` Jeff Carter
1997-05-13 0:00 ` Matthew Heaney
1997-05-13 0:00 ` Robert A Duff
1997-05-14 0:00 ` W. Wesley Groleau (Wes)
1997-05-15 0:00 ` Mats Weber
1997-05-15 0:00 ` Robert A Duff
1997-05-15 0:00 ` John G. Volan
1997-05-15 0:00 ` Matthew Heaney
1997-05-15 0:00 ` John G. Volan
1997-05-15 0:00 ` Robert A Duff
1997-05-16 0:00 ` John G. Volan
1997-05-16 0:00 ` John G. Volan [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