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: 103376,3e11ef4efc073f6b,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!l33g2000pri.googlegroups.com!not-for-mail From: ishikawa@arielworks.com Newsgroups: comp.lang.ada Subject: requeue with abort and timed call Date: Sun, 28 Dec 2008 05:24:25 -0800 (PST) Organization: http://groups.google.com Message-ID: <2a60b044-6a5c-4ce6-93e6-6eeefc8806c3@l33g2000pri.googlegroups.com> NNTP-Posting-Host: 121.108.39.92 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1230470665 411 127.0.0.1 (28 Dec 2008 13:24:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 28 Dec 2008 13:24:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l33g2000pri.googlegroups.com; posting-host=121.108.39.92; posting-account=UO0ZfgoAAAAg-AJ8SR3KlCGoe1tEbkJa User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:3096 Date: 2008-12-28T05:24:25-08:00 List-Id: Hi, I found a strange behavior of GNAT about requeue-with-abort. In the RM, I found the following definition >16 * if the original entry call was timed (or conditional), then the original expiration time is the expiration time for the requeued call. (http://www.adaic.org/standards/1zrm/html/RM-9-5-4.html) But In the following code, its timed entry call had never be aborted. When "Original_Call" does not have "delay 3.0", it got aborted. It seems that "Original_Call" takes more than 1.0 second(over the expiration time of the timed call), "with abort" does not work as intended. I think the requeued call should be aborted in this case. Does anyone understand whether this behavior is a bug or not? I could not find any definition supporting this behavior on RM. ------ with Ada.Text_IO; use Ada.Text_IO; procedure Req is task T is entry Original_Call; entry Requeued_Call; end T; task body T is begin loop accept Original_Call do Put_Line ("Original Call..."); -- takes three seconds delay 3.0; Put_Line ("Original Call Done"); requeue Requeued_Call with abort; end Original_Call; -- inifinity loop loop delay 10.0; end loop; -- will be never accepted accept Requeued_Call do Put_Line ("Requeued_Call"); end Requeued_Call; end loop; end T; begin select T.Original_Call; or -- just wait 1 second delay 1.0; Put_Line ("Aborting"); end select; Put_Line ("Parent Done"); end Req;