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,16594902ce57591b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s72.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Multitasking and containers References: <143yx0dos45nx.159wpxvfevtt8.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s72 1164601031 12.201.97.213 (Mon, 27 Nov 2006 04:17:11 GMT) NNTP-Posting-Date: Mon, 27 Nov 2006 04:17:11 GMT Date: Mon, 27 Nov 2006 04:17:11 GMT Xref: g2news2.google.com comp.lang.ada:7703 Date: 2006-11-27T04:17:11+00:00 List-Id: Matthew Heaney wrote: > "Dmitry A. Kazakov" writes: > >> Write your own container. Parallel systems require delicate handmade work. > > Horrible advice. Just declare the container inside a protect object, and > manipulate the container by calling protected procedures. Works great... Not at all, even for sequential systems. Standard libraries are necessarily compromises among various concerns such as safety, performance, ease of use, and so on. Specific projects may, and sometimes will, have requirements that are not met by such libraries. In such cases, custom versions are needed. In this case, we may have an instance of premature optimization; the OP seems to be worrying about the overhead of wrapping a container in a protected object without any evidence that this approach won't meet the project's requirements (indeed, it seems there is no project and no specific requirements are involved). In that case, it probably will "work great". But in specific cases a custom version that does allow unprotected multiple readers may be required. -- Jeff Carter "There's no messiah here. There's a mess all right, but no messiah." Monty Python's Life of Brian 84