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,af960bc705aaf51b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-04 01:33:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) Newsgroups: comp.lang.ada Subject: Re: Complexity of protected objects Date: Mon, 04 Mar 2002 09:33:54 GMT Message-ID: <3c833afb.435853953@News.CIS.DFN.DE> References: <4519e058.0202251401.27b95bb0@posting.google.com> <5ee5b646.0203021708.4812dbe7@posting.google.com> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) X-Trace: fu-berlin.de 1015234434 11117256 212.79.194.111 (16 [77047]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:20752 Date: 2002-03-04T09:33:54+00:00 List-Id: On 2 Mar 2002 17:08:06 -0800, dewar@gnat.com (Robert Dewar) wrote: >dennison@telepath.com (Ted Dennison) wrote in message news:<4519e058.0202251401.27b95bb0@posting.google.com>... >> I've generally found that to be good advice. In particular, my PO's >> always seem to end up just being specialized semaphores or locks, no >> matter how grandiose I start out planning to make them. Things just >> work a lot better that way. > >This is MUCH too restrictive, it is perfectly reasonable >to have a large complex data structure as a protected type >where the operations on it ensure that consistency is >maintained by doing related updates in a non-interruptible >manner. Theoretically, yes. Practically, I have observed the same effect as Ted Dennison pointed out. There are too many reasons why it does not work, sigh. One of them is that protected types are not tagged. As a result, very often one fails to use PO as the base for that large complex data structore. Instead of that one has a PO with an access discriminant pointing to some class wide. Slowly but steadily all the functionality flows into that tagged type and in the end the PO degrades to a simple lock. Regards, Dmitry Kazakov