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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,27bf3fa1bd0d4731,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-02 03:28:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-047-059.arcor-ip.NET!not-for-mail From: Dmitry A.Kazakov Newsgroups: comp.lang.ada Subject: Aborting requeued entry calls Date: Sat, 3 Aug 2002 00:34:20 +0200 Message-ID: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-047-059.arcor-ip.net (145.254.47.59) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1028284096 37614065 145.254.47.59 (16 [77047]) User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:27606 Date: 2002-08-03T00:34:20+02:00 List-Id: 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. Yet GNAT under Windows successfully aborts Thing.Foo_1 (after it was requeued to Foo_2). Is that OK? If yes, then the question, if a requeued entry call may be silently removed from the wait queue, how Thing could become aware of that? Let Foo_1 changes the state of Thing and Foo_2 restores it, then if Foo_2 get silently aborted Thing becomes corrupted. Any solution? Thanks. -- Regards, Dmitry Kazakov www.dmitry-kazakov.de