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: ffc1e,fb45e48e8dddeabd X-Google-Attributes: gidffc1e,public X-Google-Thread: 103376,fb45e48e8dddeabd X-Google-Attributes: gid103376,public From: John English Subject: Re: Ada Protected Object Tutorial #1 Date: 1999/12/16 Message-ID: <3858E5B3.9AB004E9@bton.ac.uk>#1/1 X-Deja-AN: 561513217 Content-Transfer-Encoding: 7bit References: <839toq$pu$1@bgtnsc03.worldnet.att.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: University of Brighton Mime-Version: 1.0 Newsgroups: comp.programming.threads,comp.lang.ada Date: 1999-12-16T00:00:00+00:00 List-Id: Kaz Kylheku wrote: > This approach to design is generally wasteful. It's more reasonable to have > public methods which always lock and unlock, and unprotected methods which > assume that an object is already locked. It's also useful for an object > to expose lock and unlock methods, and expose unprotected operations, so that > the user of the object can compose a sequence of operations into an indivisible > block. Congratulations, you've just invented the semaphore... :-) ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------