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-17 10:52:30 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!uunet!lax.uu.net!sac.uu.net!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: Container reqs X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3BCDBD65.CBB7FCF9@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: <9qctpn$lil$1@news.huji.ac.il> <3BCC01B1.18C18C98@free.fr> <3BCC6CB7.20BAA30D@boeing.com> <3BCD2EC3.3B3C4498@free.fr> Mime-Version: 1.0 Date: Wed, 17 Oct 2001 17:18:29 GMT X-Mailer: Mozilla 4.73 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: archiver1.google.com comp.lang.ada:14838 Date: 2001-10-17T17:18:29+00:00 List-Id: Jean-Marc Bourguet wrote: > > I was probably not clear enough. Tasks savety is not something binary, > it's something for which there is at least five levels. > > 0) the whole library can't be used by two tasks without explicit > synchronisation because there is use of some features (global variables, > COW datastructure build without considering tasking, ...) which make > it totally unfit for that use. > > 1) you can work savely on different objects in different tasks but not > access the same object in different tasks without synchronisation. > > 2) you can savely have read access to one object from different tasks > but modifying accesses must be protected explicitly from other accesses. > > 3) there is a limited set of modifying accesses which can be issued > simultaneously from different tasks. > > 4) whatever you do -- trying to modify the datastructure simultaneously > via iterators from different tasks -- is save. > > From my experience, > * level 4 is useless because you still need synchronisation > for other reasons when its whole generality is needed. Achieving it > has a major performance impact (every operation has to be > protected). Your level 0 is clearly a faulty design. The protected data structures in the PragmAda Reusable Components achieve level 4, no additional synchronization is needed, and the performance has yet to be found unsatisfactory. Even the unprotected structures achieve level 2. FYI, the word you should be using is "safe". -- Jeffrey Carter