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!news1.google.com!news.maxwell.syr.edu!news-rtr.nyroc.rr.com!news-out.nyroc.rr.com!twister.nyroc.rr.com.POSTED!53ab2750!not-for-mail From: "REH" Newsgroups: comp.lang.ada References: <1131117934.372137.244900@g44g2000cwa.googlegroups.com> Subject: Re: Advice on abort X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Original Message-ID: Date: Fri, 04 Nov 2005 18:35:51 GMT NNTP-Posting-Host: 69.205.134.80 X-Complaints-To: abuse@rr.com X-Trace: twister.nyroc.rr.com 1131129351 69.205.134.80 (Fri, 04 Nov 2005 13:35:51 EST) NNTP-Posting-Date: Fri, 04 Nov 2005 13:35:51 EST Organization: Road Runner Xref: g2news1.google.com comp.lang.ada:6211 Date: 2005-11-04T18:35:51+00:00 List-Id: "Dmitry A. Kazakov" wrote in message news:l1ius2k66aqm.1n607d42c495j.dlg@40tude.net... > On 4 Nov 2005 07:25:34 -0800, 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? > > Close that socket from another task. That should end the blocking I/O on > the socket with some error code. And the task will become ready accept a > rendezvous. > Thank you! You know, the simple solution always eludes me. REH