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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,11f4880dfa9887f7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-25 11:58:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjcppf01.usenetserver.com!usenetserver.com!newsfeeder.randori.com!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9r8nmb$l2j$1@e3k.asi.ansaldo.it> Subject: Re: asynchronos select question Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Thu, 25 Oct 2001 14:57:33 EDT Organization: http://www.newsranger.com Date: Thu, 25 Oct 2001 18:57:33 GMT Xref: archiver1.google.com comp.lang.ada:15195 Date: 2001-10-25T18:57:33+00:00 List-Id: In article <9r8nmb$l2j$1@e3k.asi.ansaldo.it>, Paolo Argenton says... >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 I haven't actually ever used this construct before (heck, I'd fogotten it existed). But I'd guess that an abort of the abortable part is only possible while you are within the language. If your Win32 thread is blocked waiting for an I/O at the Operating System level, there is nothing Ada can do for you. So what would probably happen here is that you will sit forever waiting for that IO to complete. Once it does, the abortable part will get aborted, and you'd see your "timeout" string (assuming there is still some Ada to execute after the I/O completes). For what you seem to be attempting to do, I think I'd use a task and a protected type. The task services the I/O source, and the protected type implements a queue of data read from the source. Then you can use a conditional or timed entry call to read the data from the protected type (queue). --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.