From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a555752235c318a9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: i'm going crazy with task Date: Tue, 30 Nov 2004 17:33:21 +0100 Message-ID: <41ACA0D1.10409@mailinator.com> References: <1101830171.387036.135810@f14g2000cwb.googlegroups.com> <1101831118.107767.254700@c13g2000cwb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de pJmd3yDCwrlsoZ7IxdKIFgLrZEUpc4Mq4SFXmOWmyIH3HHiYM= User-Agent: Mozilla Thunderbird 0.9 (X11/20041103) X-Accept-Language: en-us, en In-Reply-To: <1101831118.107767.254700@c13g2000cwb.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:6673 Date: 2004-11-30T17:33:21+01:00 List-Id: 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.