comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean François Martinez" <darkquark99@gmail.com>
Subject: Re: Select then abort can fail to abort the abortable part
Date: 20 Nov 2014 22:19:30 GMT
Date: 2014-11-20T23:19:30+01:00	[thread overview]
Message-ID: <546e68f2$0$2913$426a34cc@news.free.fr> (raw)
In-Reply-To: vwpncp0r5gp4$.1g6tt9l95v0zu$.dlg@40tude.net

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

  reply	other threads:[~2014-11-20 22:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20 21:08 Select then abort can fail to abort the abortable part Jean François Martinez
2014-11-20 21:35 ` Dmitry A. Kazakov
2014-11-20 22:19   ` Jean François Martinez [this message]
2014-11-21  8:37     ` Dmitry A. Kazakov
2014-11-21 15:26       ` Jean François Martinez
2014-11-20 21:36 ` Adam Beneschan
2014-11-20 22:55   ` Jean François Martinez
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox