🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #17681

Re: Matar un thread

#17681
From: La Niña
Date: Mon, 30 Oct 2000 13:59
16 lines
1394 bytes
> 
>     Como puedo matar un thread que se esta ejecutando (lo quiero matar
> desde un applet?. El problema es que el metodo Thread.destroy() no
> funciona, en al documentación dice que no esta implementado. (Y otros
> metodos como suspend, o stop estan "deprecated")
>     Gracias por las respuestas, Jorge


en teoria es Thread.interrupt

como dentro de un Thread siempre tienes que hacer un sleep o un yield
estos reciben la excepcion del interrup, por lo que en el catch abortas
el
bucle de thread.run
Technical Details
Message-ID: <39FD7EDB.94976C7C@mundomail.net>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!not-for-mail
References: <39F95D36.63F27376@cesatel.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,219dd3517d8bf0e2
X-Google-Attributes: gid1116f3,public
X-Google-ArrivalTime: 2000-10-30 06:04:34 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!not-for-mail
From: La Niña <terete@mundomail.net>
Newsgroups: es.comp.lenguajes.java
Subject: Re: Matar un thread
Date: Mon, 30 Oct 2000 14:59:55 +0100
Organization: Telefonica Transmision de Datos
Lines: 16
Message-ID: <39FD7EDB.94976C7C@mundomail.net>
References: <39F95D36.63F27376@cesatel.es>
NNTP-Posting-Host: 195.77.221.236
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Mailer: Mozilla 4.5 [es]C-CCK-MCD {JAZZFREE;InterACTIVE}  (Win98; I)
X-Accept-Language: es