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-18 12:03:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!grolier!dispose.news.demon.net!news.demon.co.uk!demon!pogner.demon.co.uk!zap!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Container reqs Date: 17 Oct 2001 07:02:04 +0100 Organization: Pushface Message-ID: References: <9qctpn$lil$1@news.huji.ac.il> <3BCC01B1.18C18C98@free.fr> <9qhcd2$amt$1@news.huji.ac.il> NNTP-Posting-Host: localhost X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 X-Trace: news.demon.co.uk 1003431750 nnrp-13:9127 NO-IDENT pogner.demon.co.uk:158.152.70.98 X-Complaints-To: abuse@demon.net NNTP-Posting-Date: 17 Oct 2001 06:02:06 GMT X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:14908 Date: 2001-10-17T06:02:06+00:00 List-Id: Ted Dennison writes: > In article <9qhcd2$amt$1@news.huji.ac.il>, Ehud Lamm says... > > > >Jean-Marc Bourguet wrote in message > >news:3BCC01B1.18C18C98@free.fr... > >> I'm not for making a container "threadsafe" to the point where > >> several tasks may modify the container without providing their > >> synchronisation. > >> In my experience > >> * most containers are accessed only by one task > >> * for those who are not, an explicit synchronisation is needed for > >> other > >> purpose as the container is not the only part member of the > >> datastructure > >> which has to be modified atomically. > >> > > > >I agree, that we should not attempt to make everything protected. > > I find myself having to implement small queues with controlled types a lot. :-( > > This issue is why Booch also has tasksafe and non-tasksafe versions of > everything. This is still an open area. You can easily create Guarded versions of things (well, those that don't have structural sharing), where the user gets to Seize and Release. But Synchronized versions (where the locking is internal) are more work, and also semantically challenging for Iterators I think.