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,3a6337228af80b02 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.92.202 with SMTP id co10mr2456005wib.1.1361849127102; Mon, 25 Feb 2013 19:25:27 -0800 (PST) MIME-Version: 1.0 Path: bp2ni59441wib.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.teledata-fn.de!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Question: What's the difference between pools of pools and Ada 2012's new subpools? Date: Mon, 18 Feb 2013 17:24:34 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <8fe47d10-1889-43e7-be85-510ece95c1a6@googlegroups.com><1f5hzkoyu135m.8modyeyr3mtp$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1361229878 29441 69.95.181.76 (18 Feb 2013 23:24:38 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 18 Feb 2013 23:24:38 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2013-02-18T17:24:34-06:00 List-Id: "Simon Wright" wrote in message news:lyd2vzqi0w.fsf@pushface.org... > "Dmitry A. Kazakov" writes: > >> As Randy said the problem with pools when used for management the life >> cycle of objects is finalization of controlled objects. If subpools >> alleviate this problem is to be seen. > > What Randy said was that the _hand-written_ subpool implementations the > ARG had seen had problems with finalizable objects. Of coaurse, in the > end all implementations are hand-written by somebody. Right (I think). When you create your own subpool-like mechanism, you can't force finalization of objects (unless you keep a list of objects in the subpool and free them individually, which would defeat the purpose). So most people's simply say that they cannot be used with controlled objects (or tasks or protected objects). Which is limiting. The subpool mechanism in Ada 2012 is designed to ensure that objects are finalized no later than when the subpool is discarded (via Unchecked_Deallocate_Subpool). In that sense, it works just like Unchecked_Deallocation (except all at once, rather than one at a time). Of course, I can't know whether GNAT actually implements this correctly! Randy.