🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: newbie: Threads

#7302
From: Petar Banicevic
Date: Tue, 26 Jun 2001 08:09
29 lines
1615 bytes
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();
 ...


"Joi Ellis [TeamB]" <joi@aravox.com> wrote in message
news:3b37926b_1@dnews...
> Petar Banicevic <petar_b@usa.net> wrote:
> > Can I do this ?
>
>
> > I want to start worker thread (it is doing some background calculation).
Is
> > this proper way to restart it ?
>
> Once a thread has died, it can not be restarted.  You can only create
> a new thread.
>
> --
> 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: <3b384367$1_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
References: <3b378205$1_2@dnews> <3b37926b_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 01:22:16 PST
From: "Petar Banicevic" <petar_b@usa.net>
Newsgroups: borland.public.jbuilder.java.language
References: <3b378205$1_2@dnews>  <3b37926b_1@dnews>
Subject: Re: newbie: Threads
Date: Tue, 26 Jun 2001 10:09:58 +0200
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 12.98.142.222
Message-ID: <3b384367$1_1@dnews>
X-Trace: dnews 993543015 12.98.142.222 (26 Jun 2001 01:10:15 -0700)
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