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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7322e496af76698c X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.germany.com!storethat.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada Thread Termination Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Sat, 2 Feb 2008 20:55:46 +0100 Message-ID: NNTP-Posting-Date: 02 Feb 2008 20:55:46 CET NNTP-Posting-Host: 9bf325f9.newsspool3.arcor-online.net X-Trace: DXC==Cmg5HJ:0kV\9P[:DUn00QMcF=Q^Z^V3X4Fo<]lROoRQgUcjd<3m<;R_@PC\=\C On Sat, 2 Feb 2008 11:41:55 -0800 (PST), shaunpatterson@gmail.com wrote: > 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? Close the socket from outside, that would cause listening to end with a "socket closed" error, so the listener task could quit. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de