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 autolearn=ham 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!postnews.google.com!g47g2000cwa.googlegroups.com!not-for-mail From: "REH" Newsgroups: comp.lang.ada Subject: Re: Advice on abort Date: 7 Nov 2005 09:09:53 -0800 Organization: http://groups.google.com Message-ID: <1131383393.903975.180350@g47g2000cwa.googlegroups.com> References: <1131117934.372137.244900@g44g2000cwa.googlegroups.com> <436f6ad8$0$196$edfadb0f@dread11.news.tele.dk> NNTP-Posting-Host: 192.35.35.35 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1131383399 26066 127.0.0.1 (7 Nov 2005 17:09:59 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 7 Nov 2005 17:09:59 +0000 (UTC) In-Reply-To: <436f6ad8$0$196$edfadb0f@dread11.news.tele.dk> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g47g2000cwa.googlegroups.com; posting-host=192.35.35.35; posting-account=lnUIyw0AAACoRB2fMF2SFTIilm8F10q2 Xref: g2news1.google.com comp.lang.ada:6268 Date: 2005-11-07T09:09:53-08:00 List-Id: Poul-Erik Andreasen wrote: > REH wrote: > > What are the best options when a task needs to be terminated, but > > signaling the task may not be possible? We have tasks that sometimes > > need to be terminated, but may potentially be blocked on a resource, > > such as a socket. Currently we use OS-specific calls to terminate the > > task, but I've never liked that. I've been thinking of using the abort > > statement, but I don't think that's very graceful either. I also would > > rather not complicate the code (or force polling behavior) by making > > the sockets non-blocking. Any advice? > > > One poosibillty is too use asyncronius transfer of control. Somthing > like this. > > > select > call.foo_entry -- this i is a guarded entry in a protected > object or -- another task > -- her can you have anything yuo may need to clean up after the abort > then abort > listen_to_socket this is the function wich may be blocked > end select > > Thee foo_entry basicly dosen't need to do anything. an you have onother > procedure or entry to open it. > > > PEA. I was once advised never to use ATC because it is very slow. Is this true? It was in reference to GNAT.