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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8ddc02527645a844 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-31 20:25:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!msunews!not-for-mail From: "Chad R. Meiners" Newsgroups: comp.lang.ada Subject: Re: tasking with GNAT 3.14p on windows Date: Mon, 31 Mar 2003 23:17:43 -0500 Organization: Michigan State University Message-ID: References: <3e87f4e2$1@epflnews.epfl.ch> <7vu1djubmk.fsf@vlinux.voxelvision.no> NNTP-Posting-Host: arctic.cse.msu.edu X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Xref: archiver1.google.com comp.lang.ada:35845 Date: 2003-03-31T23:17:43-05:00 List-Id: "Robert A Duff" wrote in message news:wcck7ef9bzv.fsf@shell01.TheWorld.com... > > The Ada RM has nothing to say about system calls, so of course they are > not guaranteed (by the RM) to be abortable. But I'm very interested in > what GNAT does with system calls in the presence of abort. Can you tell > us what happens if, say, a socket read is aborted? And if it's not > abortable, how does one work around that fact? Ah, such a good question. The quick answer is that one does not depend on the use of aborts when doing socket programing ;) Actually according to winsock if you close the socket while another task is block on it waiting for a read it will return a from the read function with an error. So if you want to shutdown you socket servers close your sockets and then abort your tasks. > Or suppose one task does a socket read, and another task gets aborted. > How well does that work? On windows, I mean. Assume polling is turned > on. This works well since the tasks are mapped to native threads so the other thread is free to poll away for the abort. Now I must say I am by no means an expert on the gnat compiler; my source diving has been limited to the parser and the Text_IO implementation. My information on tasking is based on empirical experience, the gnat documentation and a few comments I think I remember Dr. Dewar making on CLA ;) -CRM