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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,11f4880dfa9887f7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-25 17:20:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed.rt.ru!news-stob.telia.net!news-sto.telia.net!194.22.194.4.MISMATCH!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: "Peter Hend�n" Newsgroups: comp.lang.ada References: <9r8nmb$l2j$1@e3k.asi.ansaldo.it> Subject: Re: asynchronos select question X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Thu, 25 Oct 2001 23:30:22 GMT NNTP-Posting-Host: 213.67.175.183 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1004052622 213.67.175.183 (Fri, 26 Oct 2001 01:30:22 CEST) NNTP-Posting-Date: Fri, 26 Oct 2001 01:30:22 CEST Organization: Telia Internet Xref: archiver1.google.com comp.lang.ada:15205 Date: 2001-10-25T23:30:22+00:00 List-Id: "Paolo Argenton" wrote: > select > delay 5.0; > put_line (" timeout" ); > then abort > proc_with_blocking_io; -- i.e. wait for a byte to come from a serial > line for istance > end select; > it never triggers the timeout part and waits forever, at least on NT+gnat > 3.13. Is it correct ? incorrect ? my misunderstanding ? compiler/OS > dependant code ? Check out "pragma Polling" in the GNAT Reference Manual and the switch -gnatP in the User's Guide. An asynchronous abort will not work at all under NT without pragma polling (ON). In this particular case it will not work correctly (at least not under NT) anyway. The blocking_io call is "outside the reach" of Ada, since no polling can take place with the process blocked in I/O. If you replace the blocking io call with a very time-consuming calculation, it will work just fine with Polling (ON) but not with (OFF) - the default. Just a question to those who might know. Is this behaviour conforming to the standard? I can see no reason in the ARM for not being able to abort a blocking io operation. Does it work on other platforms? Regards, Peter H. -- Peter Hend�n http://www.algonet.se/~phenden ICQ: 14672398 Teknisk Dokumentation AB http://www.tdab.com