🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7310

Re: newbie: Threads

#7310
From: Joi Ellis [TeamB]
Date: Tue, 26 Jun 2001 13:28
19 lines
1333 bytes
Petar Banicevic <petar_b@usa.net> wrote:
> I know that...

> Can I use isAlive to see if thread has finished (dead) and to recreate it...

>  ...
>        if (!worker.isAlive())
>          worker=new decoderThread();
>          worker.start();
>  ...

Yes.  You're creating a new thread object and replacing the dead one.
That should work.

-- 
Joi Ellis (TeamB)               http://www.teamb.com/
No direct email, please.
For best results, post on news server newsgroups.borland.com!
Newsgroup Info: http://www.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <3b388df9_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews!not-for-mail
References: <3b378205$1_2@dnews> <3b37926b_1@dnews> <3b384367$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,16d666d905e9f60d
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-26 06:36:14 PST
Message-ID: <3b388df9_1@dnews>
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: newbie: Threads
Newsgroups: borland.public.jbuilder.java.language
References: <3b378205$1_2@dnews>  <3b37926b_1@dnews> <3b384367$1_1@dnews>
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.16-3 (i686))
NNTP-Posting-Host: 209.46.41.66
Date: 26 Jun 2001 06:28:26 -0700
X-Trace: dnews 993562106 209.46.41.66 (26 Jun 2001 06:28:26 -0700)
Lines: 19
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews!not-for-mail