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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,92a027c293f03acb X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Wiktor Moskwa Newsgroups: comp.lang.ada Subject: Re: Workqueues in Ada Date: Sat, 28 Jul 2007 21:25:18 +0000 (UTC) Organization: tp.internet - http://www.tpi.pl/ Message-ID: References: <4rvzewqs9ba3$.pluy1xzoi5lr$.dlg@40tude.net> NNTP-Posting-Host: aaeu42.neoplus.adsl.tpnet.pl X-Trace: nemesis.news.tpi.pl 1185657918 20870 83.4.124.42 (28 Jul 2007 21:25:18 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Sat, 28 Jul 2007 21:25:18 +0000 (UTC) User-Agent: slrn/0.9.8.1 (Linux) Xref: g2news2.google.com comp.lang.ada:1250 Date: 2007-07-28T21:25:18+00:00 List-Id: On 28.07.2007, Simon Wright wrote: > Sounds very complicated & fragile to me, it no longer resembles > anything one would recognise as a 'queue'. > It seems that my 'circular queue' idea was a blind alley. > It's hard to see how to avoid this with unbounded containers. You > could look at alternative container packages? (I normally wouldn't > suggest this, given Ada.Containers, but a BC.Comtainers.Queues.Bounded > from http://booch95.sf.net doesn't allocate .. but you have to know > the maximum number of elements you are going to need.) I think it can be done with unbounded containers provided that a custom storage pool can be used. The pool would allocate memory in chunks for i.e. 100 items and thus only 1 call in 100 would result in malloc call. Deleted items would make place for new ones and so on. -- Wiktor Moskwa