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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!news.netfront.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Ada advocacy Date: Thu, 29 Aug 2013 21:47:58 -0700 Organization: Netfront http://www.netfront.net/ Message-ID: References: <19595886.4450.1332248078686.JavaMail.geo-discussion-forums@vbbfy7> <2012032020582259520-rblove@airmailnet> <12ee9bc5-3bdf-4ac0-b805-5f10b3859ff4@googlegroups.com> <6c58fae4-6c34-4d7a-ab71-e857e55897c0@x6g2000vbj.googlegroups.com> NNTP-Posting-Host: 172.242.59.58 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1377838082 35185 172.242.59.58 (30 Aug 2013 04:48:02 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Fri, 30 Aug 2013 04:48:02 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:17042 Date: 2013-08-29T21:47:58-07:00 List-Id: On 08/29/2013 08:46 AM, Robert A Duff wrote: > > protected P is > entry E1(...); > entry E2(...); > private > State: Enum := This_State; > end P; > > protected body P is > entry E1(...) when State = This_State do > ... > end E1; > > entry E2(...) when State = That_State do > ... > end E2; > end P; > > In task T: > > select > P.E1(...); > else > ... -- (***) > end select; > > P is always in one of two states: willing to do E1, and willing > to do E2. At (***), we know that at the moment P.E1 was called, > P was not willing to do E1, and was therefore willing to do E2. > It is impossible for P to be in a state where it is not willing > to do either E1 or E2. (A state visible to clients, I mean.) That's not quite right. P can also be executing E1 or E2, in which case it is not "willing" to do either. T will end up at (***) in both of those cases as well. -- Jeff Carter "Now go away or I shall taunt you a second time." Monty Python and the Holy Grail --- news://freenews.netfront.net/ - complaints: news@netfront.net ---