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: a07f3367d7,4d062d5c58234698 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.94.8 with SMTP id cy8mr5169160wib.1.1356215906656; Sat, 22 Dec 2012 14:38:26 -0800 (PST) Path: l12ni194625wiv.1!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newspeer1.nac.net!news.mi.ras.ru!goblin2!goblin.stu.neva.ru!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: right compilation unit for C as main? Date: Tue, 18 Dec 2012 23:04:48 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Injection-Date: Tue, 18 Dec 2012 23:04:48 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="dfff62e1e537b55df42008571c03e0fe"; logging-data="1429"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ps0xvfa4KJL0C56Lk1hFzK1j4Zgkrpws=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:Dfecv7lnzZG+5w4lm/6ch/ExLRY= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-12-18T23:04:48+00:00 List-Id: On Tue, 18 Dec 2012 12:13:40 -0500, Robert A Duff wrote: > Brian Drummond writes: > >> adainit() should not block! It should set the environment up for Ada >> and return to your C main program. Which will then call an ...ahhh, Ada >> procedure which WILL block because the tasks it creates cannot outlive >> it... > > That's true only if it declares objects containing tasks. > If it allocates objects containing tasks via "new", > with the access type declared at library level, then the tasks can > outlive their creator. Thanks for the correction; it may give Patrick another option. (Though declaring tasks within the Ada procedure looks easier to get right - at least for a relative beginner like myself. - Brian