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,e859f774bbb3dfb3 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!transit3.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!panix!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: another way to shoot yourself in the foot? Date: Tue, 24 Jun 2008 13:20:54 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <54157920-377a-441b-9b0b-f0c4f9ddffec@f36g2000hsa.googlegroups.com> <54435596-5e7f-4686-a2b7-1e22d7c4b186@p25g2000hsf.googlegroups.com> <483ugmvkl2ea.1hrqsq7ru4t1x$.dlg@40tude.net> <12dhu8e1w5ac9.1s9hzkf9d2rsy$.dlg@40tude.net> <3bc1018b-b275-4a59-8302-6a3262766f63@z24g2000prf.googlegroups.com> <6ug5vhz5j1e4$.1lqpd52jz6qry.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1214328054 9083 192.74.137.71 (24 Jun 2008 17:20:54 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 24 Jun 2008 17:20:54 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:PISnQ8huchCOjqZzq2xolX1G0Bc= Xref: g2news1.google.com comp.lang.ada:843 Date: 2008-06-24T13:20:54-04:00 List-Id: "Dmitry A. Kazakov" writes: > On Tue, 24 Jun 2008 07:59:35 -0700 (PDT), Adam Beneschan wrote: > >> I've probably lost the plot of this thread. But in regards to the >> example, I think the example is "no". The semantics should be exactly >> the same as if Interesting's body were simply "return X : T;". The >> first extended return statement that raises an exception doesn't have >> any effect, in terms of starting a new task or anything like that, >> because the RM explicitly says that task activation doesn't occur >> until after the function returns (6.5(7)). > > OK, then the notorious problem of Ada 95, that a task cannot be > initialized, in the sense that upon initialization you could pass > parameters to it via a rendezvous, is still there. The way to initialize tasks in Ada 95 and Ada 2005 is to pass discriminants to the task. >... "Constructing functions" > do not help here, because you cannot engage a rendezvous before return. Too > bad. You can pass discrims whether you use constructor functions or not. > Tasks finalization does not work either, because there is no destructing > functions ("malfunctions" to use the name Robert Duff suggested (:-)) > anyway. I'm not sure what the issue is, here. Masters wait for their dependent tasks to terminate (or be "ready" to terminate -- at a terminate alternative) BEFORE the task objects are finalized. So when a task object is finalized, it is already terminated, so it doesn't make sense to rendezvous with it. > Task as a component is still no runner... - Bob