From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: i'm going crazy with task
Date: Tue, 30 Nov 2004 17:33:21 +0100
Date: 2004-11-30T17:33:21+01:00 [thread overview]
Message-ID: <41ACA0D1.10409@mailinator.com> (raw)
In-Reply-To: <1101831118.107767.254700@c13g2000cwb.googlegroups.com>
mferracini wrote:
> mferracini wrote:
>
>
>>using some trick (like win32 package) is possible have a pointer to
>
> the
>
>>entry of a task?
>>
>>thanks
>
>
> or a signle istance of the scheduler :-/
If I have understood you right, I don't think you could get away with
that in Ada 95 using generics.
You could, instead, use an OO approach and have something like:
type Runnable is abstract limited null record;
procedure Run (This : in out Runnable) is abstract;
Users would then inherit from the runnable object, providing
implementation for the Run procedure.
Then your task specification could be:
task type dummy (Code : access Runnable'Class) is
entry Run_It;
end;
and in the body you simply call the dispatching procedure
Run (Code.all);
I hope this make sense to your problem.
next prev parent reply other threads:[~2004-11-30 16:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-30 15:56 i'm going crazy with task mferracini
2004-11-30 16:11 ` mferracini
2004-11-30 16:33 ` Alex R. Mosteo [this message]
[not found] ` <lglqq0lvgvdbr0gbjhqhit27omga2cm7r5@4ax.com>
2004-12-01 10:16 ` Adrien Plisson
[not found] ` <5eorq0lbcd90apmjoe46ob4pj96pchtcno@4ax.com>
2004-12-01 16:41 ` Adrien Plisson
2004-12-02 9:44 ` mferracini
[not found] ` <gmduq0hd1l97714g219custsomfo9b8an6@4ax.com>
2004-12-02 17:38 ` Adrien Plisson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox