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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d29be2403a55fcc8 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.alt.net!atl-c07.usenetserver.com!pc02.usenetserver.com!ALLTEL.NET!not-for-mail Date: Mon, 09 May 2005 09:29:39 -0500 From: "Marc A. Criley" User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Dynamic task activation References: <1115636549.778984.32550@z14g2000cwz.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <200f5$427f73d3$4995042$12412@ALLTEL.NET> X-Complaints-To: abuse@usenetserver.com Organization: UseNetServer.com X-Trace: 200f5427f73d3a13cf5e712412 Xref: g2news1.google.com comp.lang.ada:10976 Date: 2005-05-09T09:29:39-05:00 List-Id: Jean-Pierre Rosen wrote: > evangeli@cnam.fr a �crit : > >> hello >> let's take this piece of code : >> >> ==================================== >> ... >> task type T_Task; >> type T is access T_Task; >> ... >> V : T := new T_Task; >> -- 1 >> ... >> ==================================== >> >> Is the task pointed by V necessarily activated at point 1, or can it be >> activated later? >> >>> From RM 9.2.4, I guess the answer is yes but i wanted to be sure. >> >> > The task is activated *before* the return from "new". The goal is that > when you can access the task, it is guaranteed to have been activated. And if for some reason you don't want the task to actually begin its application-specific processing until later, you can declare some kind of "Start" entry in the task, which is then called at the appropriate time. task body T_Task_That_Waits is begin select accept Start; or terminate; end select; -- Application-oriented processing now begins... end T_Task_That_Waits; Marc A. Criley www.mckae.com