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.5 required=5.0 tests=BAYES_05,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7322e496af76698c,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e10g2000prf.googlegroups.com!not-for-mail From: shaunpatterson@gmail.com Newsgroups: comp.lang.ada Subject: Ada Thread Termination Date: Sat, 2 Feb 2008 11:41:55 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 155.219.241.10 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1201981315 26834 127.0.0.1 (2 Feb 2008 19:41:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 2 Feb 2008 19:41:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e10g2000prf.googlegroups.com; posting-host=155.219.241.10; posting-account=O0hwoQoAAABTUhctVKyLpysYxVt3QnYo User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19688 Date: 2008-02-02T11:41:55-08:00 List-Id: I have a socket listening thread that I would like to be able to terminate via a select call. task body Socket_Listener is begin accept Initialize do -- setup end Initialize; loop Listen_For_Message; end loop; end Socket_Listener I would like to have another accept statement inside the loop to break out of the loop. Listen_For_Message is actually a call to a blocking socket read, so the call may not finish if nothing else comes through the socket. I'm not sure how to structure this thread so it can be terminated on demand. Any ideas? Thanks -- Shaun