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-Thread: a07f3367d7,a4db0fc323f0b09e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!nospam From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Barrier re-evaluation issue with GNAT 4.3.2 Date: Mon, 28 Sep 2009 08:39:28 -0400 Organization: The Wasteland Message-ID: References: NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.0 Cancel-Lock: sha1:Wvv/9LgoTIaZ5lSTb3lpVZevptc= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: g2news2.google.com comp.lang.ada:8511 Date: 2009-09-28T08:39:28-04:00 List-Id: In article , Reto Buerki wrote: > John B. Matthews wrote: > > I get the same result with FSF GNAT 4.3.4. I revised your code to follow > > the "protected Event" example seen here: > > > > > > > > It seems to work. The compiler warns, "potentially blocking operation in > > protected operation" in Wakeup, although the Signal barrier is always > > true. I'm not sure the extra entries _should_ be required, but I think > > it might be more reliable in the face of multiple threads calling Wait. > > I don't know a reason why it wouldn't work under 4.3.2. > > Thanks for your effort in confirming the issue with GNAT 4.3.4 and for > the "protected Event" example. You're welcome. > We will see how we can integrate your idea into our project as a > workaround for the re-evaluation problem. This alternative approach also works, without using requeue: I am troubled by the "potentially blocking operation" warning. Two things make me think it may be irrelevant: 1) Signal does not actually block, except to dequeue waiters, and 2) Wakeup, which enters Signal, is itself a protected procedure: I'd welcome critical thoughts. -- John B. Matthews trashgod at gmail dot com