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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public From: Patrick Logan Subject: Re: Software landmines (loops) Date: 1998/09/03 Message-ID: #1/1 X-Deja-AN: 387484419 References: <6sjms6$7c4$1@hirame.wwa.com> <6sm5qh$2r2$1@hirame.wwa.com> Organization: Teleport - Portland's Public Access (503) 220-1016 NNTP-Posting-Date: Thu, 03 Sep 1998 06:58:57 PDT Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-03T00:00:00+00:00 List-Id: In comp.object Robert Martin wrote: : My point is that the technique is not completely general. It works well for : mutexes, allocated memory buffers, locks, etc. But does not work as well : for restoring partial results in complex data structures, etc. It would work well in a transactional runtime environment that supported nested transactions. A modification of some structure could be attempted within a nested transaction. If it failed for any reason, that transaction could be aborted, restoring the state of the runtime to what it was before the modification. Gemstone does not currently offer nested transactions. If you abort, you abort the all changes since the beginning of the current transaction. But you could still use a try{}finally{} in this style. Gemstone does have a "selective abort" where you can choose the specific objects to abort. You could selectively abort your modifications in a try{}finally{}. But this is tricky. Selective abort is usually considered a tool for implementing Gemstone itself, and not an application developer's tool. -- Patrick Logan (H) mailto:plogan@teleport.com (W) mailto:patrickl@gemstone.com http://www.gemstone.com