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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8eff44ec1bcf8433 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-30 09:48:47 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Container reqs Date: 30 Oct 2001 12:45:37 -0500 Organization: NASA Goddard Space Flight Center Message-ID: References: <9qctpn$lil$1@news.huji.ac.il> <3BCC01B1.18C18C98@free.fr> <3BCC6CB7.20BAA30D@boeing.com> <9qi2c8$gpb$1@nh.pace.co.uk> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1004464015 4696 128.183.220.71 (30 Oct 2001 17:46:55 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 30 Oct 2001 17:46:55 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:15426 Date: 2001-10-30T17:46:55+00:00 List-Id: Barry Kelly writes: > In article <9qi2c8$gpb$1@nh.pace.co.uk> > "Marin David Condic" > wrote: > > > If you wish to keep the realtime/embedded crowd happy, you need to have > > task-safe versions. > > C++ can implement task safety using the RAII (resource aquisition is > initialization) idiom, which eliminates the need for creating a whole > new type for task-safe access to structures. It does not "eliminate the need". If _all_ types in the library use initialization to acquire an appropriate lock, then _all_ types in the library suffer from that overhead, which can be significant. The point is to provide types that are as fast as possible, and only add the task lock overhead if absolutely necessary. Only the user can tell whether they need the task lock -- -- Stephe