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,a046ce7f5ee1fa51 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-04 10:11:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn11feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc02.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: new_line in a put_line References: <8d9suu4d65a91bu1qf9hl0eb9dpo2h8c02@4ax.com> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc02 1039025484 12.234.13.56 (Wed, 04 Dec 2002 18:11:24 GMT) NNTP-Posting-Date: Wed, 04 Dec 2002 18:11:24 GMT Organization: AT&T Broadband Date: Wed, 04 Dec 2002 18:11:24 GMT Xref: archiver1.google.com comp.lang.ada:31441 Date: 2002-12-04T18:11:24+00:00 List-Id: > The problem as I see it, is of course that one tries to express a > CRITICAL SECTION in terms of OBJECTS. This *cannot* be good. The first > is about execution flow control the second is about data. Then you should use a task. Using the lock object is a short, possibly faster, idiom to accomplish the purpose. It's like the "good morning" in "Good morning gentlemen. I have some bad news..." You are not trying to say the morning is a good one, you are trying to say "ok, let's get started, I have the floor and want your attention." "Good morning" is quicker. It may require some comments to explain what's going on to someone unfamiliar with the idiom, but it's a valuable idiom. A recent thread here mentioned using an asm string scan operation in conjunction with boolean arrays. A purist might say that's not what it was intended for, but a pragmatist would say it's an excellent idea.