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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e2b1bd6557babda6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-14 02:35:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-pas-nf2!elnk-pas-nf1!newsfeed.earthlink.net!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.clear.net.nz!news.clear.net.nz.POSTED!not-for-mail NNTP-Posting-Date: Mon, 14 Jul 2003 04:34:58 -0500 From: Craig Carey Newsgroups: comp.lang.ada Subject: Re: Terminating a task Date: Mon, 14 Jul 2003 21:34:58 +1200 Message-ID: References: X-Newsreader: Forte Agent 1.92/32.572 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Organization: Customer of Mercury Telecommunications Ltd Cache-Post-Path: drone5.qsi.net.nz!unknown@tnt1-287.quicksilver.net.nz X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) X-Original-NNTP-Posting-Host: drone5-svc-skyt.qsi.net.nz X-Original-Trace: 14 Jul 2003 21:34:55 +1200, drone5-svc-skyt.qsi.net.nz NNTP-Posting-Host: 203.97.37.6 X-Trace: sv3-gv3sASRrO0SF5mHhhgFwpt/bSmUMtUn1/v6AraJ/fVGGG7cqRezMuneSG5+xUVS+LFnRNT+qoo5Epgp!RG2L6XU+9/mbmpOtU3kp2rxW1edjc3r543hZ31lfpi2sPb6K8fqEZ7wKCUvF9TVOts3PYjTijLrF!IydRUVU= X-Complaints-To: Complaints to abuse@clear.net.nz X-DMCA-Complaints-To: Complaints to abuse@clear.net.nz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:40257 Date: 2003-07-14T21:34:58+12:00 List-Id: On Sat, 12 Jul 2003 16:03:27 +0200, "kat-Zygfryd" <6667@wp.pl> wrote: >If I have a task running Get_Line (from an AdaSocket) >how can I terminate this task from within another task? >Simply shutting down the socket doesn't work as >the thread is interrupted by an exception only when >there is data sent from the client attached to the socket. On Sat, 12 Jul 2003 16:37:09 +0200, "kat-Zygfryd" <6667@wp.pl> wrote: >I tried to use Abort_Task but the whole program >terminates with a message that the environment task If a task is blocked on a socket then either close that socket or shutdown the TCP stack. This text would not be correct if the source code was rewritten: "Simply shutting down the socket doesn't work as ... " PS. With GNAT 3.15 in Linux/etc., to get Ctrl-C running safely, user- side code is written to unblock all blocking statements in tasks. ------------ PS. The new "Computer Language Shootout" website now has Ada. http://dada.perl.it/shootout/index.html GNAT Ada came first of 32 entries in one OO speed test http://dada.perl.it/shootout/methcall.html My "wc" word count program got eliminated probably since the tester could not link in Win32 "_setmode" and "_read". (Ada 95 packages do not allow accurate reading from the standard input). At least 3 of the Ada examples vanished (including a regular expressions example), probably for having too many lines in a package (strings, hashes). Some C programmers decided to have their 'sumcol' entries pick the first number when a line contained 2 numbers and it seemed incorrect: http://dada.perl.it/shootout/sumcol.html Craig Carey -------------------------- How To Cross-Compile to a Linux target while compiling in a FreeBSD 5 host. Some new instructions are here: http://www.ijs.co.nz/code/ada95-freebsd-to-linux-cross-compiler.txt