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-Thread: 103376,be3d89c2ad66a506 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!news.wiretrip.org!news2.arglkargh.de!noris.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Advice on abort Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1131117934.372137.244900@g44g2000cwa.googlegroups.com> <436f6ad8$0$196$edfadb0f@dread11.news.tele.dk> <1131383393.903975.180350@g47g2000cwa.googlegroups.com> <1rb5pcog6iau7$.180ltiuk2q6cv.dlg@40tude.net> <4370bc36$0$180$edfadb0f@dread11.news.tele.dk> <1ozi307fng5fi$.1ms3kyzc7defi$.dlg@40tude.net> <4370d97d$0$141$edfadb0f@dread11.news.tele.dk> Date: Tue, 8 Nov 2005 21:05:11 +0100 Message-ID: NNTP-Posting-Date: 08 Nov 2005 21:05:06 MET NNTP-Posting-Host: bf156839.newsread4.arcor-online.net X-Trace: DXC=j7AGW>=F2\UHDPY X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:6299 Date: 2005-11-08T21:05:06+01:00 List-Id: On Tue, 08 Nov 2005 17:59:41 +0100, Poul-Erik Andreasen wrote: > Dmitry A. Kazakov wrote: >> It all depends on the particular implementation of the socket library and >> how Ada tasks are mapped to system threads and processes. All sorts of >> resource leaks are thinkable. For example, you might be unable to listen >> that TCP/IP port until process restart or it won't abort etc. > > The time of the abortion are at the end of the first part of the > ACT so a cant se how the following could make any problems. Just consider a possible implementation of abort. You have a pending operation on some hardware. Let a driver lock TCB and relevant memory pages until I/O completion. What an Ada RTL might undertake against that, if there is no way to cancel it, or more probably, it just does not know about any I/O of this kind? Consider Ada RTL scheduling Ada tasks within one system thread. In this case any alien I/O will block everything including whole Ada RTL. Consider ACT implementation which simply stops busy polling for I/O status and leaves things as they are. That is: I/O continues and your task goes further. Any consequent operation will block. Any re-opening of the same communication channel will fail. -------- The best solution is to use some semi-standard library. Unfortunately Ada does not have sockets. But if we are talking about GNAT then obviously to use GNAT.Sockets is the first candidate to consider, because ACT (no pun intended (:-)) will hopefully take care of its reasonable implementation of all platforms they support. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de