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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-a.proxad.net!nnrp1-1.free.fr!not-for-mail From: Jean =?iso-8859-1?q?Fran=E7ois?= Martinez Subject: Re: Select then abort can fail to abort the abortable part Newsgroups: comp.lang.ada References: <546e5862$0$1628$426a34cc@news.free.fr> User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 20 Nov 2014 22:19:30 GMT Message-ID: <546e68f2$0$2913$426a34cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 20 Nov 2014 23:19:30 CET NNTP-Posting-Host: 82.225.39.24 X-Trace: 1416521970 news-4.free.fr 2913 82.225.39.24:45570 X-Complaints-To: abuse@proxad.net Xref: news.eternal-september.org comp.lang.ada:23586 Date: 2014-11-20T23:19:30+01:00 List-Id: On Thu, 20 Nov 2014 22:35:27 +0100, Dmitry A. Kazakov wrote: > > You certainly should not abort any code changing dynamically allocated > structures. I don't know the implementation of > Ada.Containers.Doubly_Linked_Lists, but it is not protected against > abort in the middle of changing list links, you may get garbage in the > result. > Actually Lists are Controlled Objects and an exception is raised if you try to abort a task at the time it is trying to modify the List > You should almost never use the asynchronous transfer of control. A > clean method of aborting a lengthy computation is by inserting > inspection points within loops and raising an exception when abort was > requested or time was expired. I was just kicking the tires of something (select then abort) I have never used. --- Jean-François Martinez