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,27bf3fa1bd0d4731 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-02 08:34:11 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Aborting requeued entry calls Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Fri, 2 Aug 2002 15:33:17 GMT References: NNTP-Posting-Host: shell01.theworld.com Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:27614 Date: 2002-08-02T15:33:17+00:00 List-Id: Dmitry A.Kazakov writes: > Hi! > > I have a problem and a question. Consider the following: > > package Test_Abort is > protected Thing is > entry Foo_1; > entry Foo_2; > end Thing; > end Test_Abort; > ------------------------ > with Ada.Text_IO; use Ada.Text_IO; > > package body Test_Abort is > protected body Thing is > entry Foo_1 when True is > begin > Put_Line ("Foo_1 requeues to Foo_2"); > requeue Foo_2; -- w/o abort > end Foo_1; > entry Foo_2 when False is > begin > null; > end Foo_2; > end Thing; > end Test_Abort; > ------------------------- > with Test_Abort; use Test_Abort; > with Ada.Text_IO; use Ada.Text_IO; > > procedure Test is > begin > select > delay 1.0; > then abort > Thing.Foo_1; > end select; > Put_Line ("Why is that abortable?"); > end Test; > -------------------------- > > The problem. From what I read about requeue with no abort I would expect > that Test should hang forever. Yes, I think that's correct. - Bob