From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Task Discriminants & Arrays
Date: 1997/05/15
Date: 1997-05-15T00:00:00+00:00 [thread overview]
Message-ID: <EA800I.Dv2@world.std.com> (raw)
In-Reply-To: 3379C86F.352@this.message
In article <3379C86F.352@this.message>,
W. Wesley Groleau (Wes) <see.signature@this.message> wrote:
>Is it not true that I can read the ID of each task?
You can read them.
>function "<" ( Left, Right : Discriminated_Task ) return Boolean is
>begin
> return Left.ID < Right.ID;
>end "<"
>
>-- write Bob Duff's ID function to ensure that all IDs are in A'Range
>-- instantiate your favorite sort with the "<" above and Matt's array.
>-- declare the array, then sort it.
>-- result: A(I).ID = I for all I in A'Range
But you can't move the tasks around -- they're limited. You could move
pointers to tasks around, but if you're willing to use pointers, you
might as well use allocators, and assign the id's you want. I suppose
you could have an array of tasks, and an array of pointers to tasks, and
sort the latter (and hide the former from clients). The only advantage
I can see to that is that it allows parallel activation of the tasks.
- Bob
next prev parent reply other threads:[~1997-05-15 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 ` Robert A Duff
1997-05-14 0:00 ` W. Wesley Groleau (Wes)
1997-05-15 0:00 ` Robert A Duff [this message]
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
1997-05-15 0:00 ` Mats Weber
1997-05-13 0:00 ` Jeff Carter
1997-05-13 0:00 ` Matthew Heaney
1997-05-13 0:00 ` John G. Volan
1997-05-14 0:00 ` Jeff Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox