Article View: borland.public.jbuilder.java.language
Article #7369Re: newbie: Threads
From: John McGrath TeamB
Date: Mon, 25 Jun 2001 07:31
Date: Mon, 25 Jun 2001 07:31
20 lines
1496 bytes
1496 bytes
On Sun, 24 Jun 2001 20:38:38 +0200, Yonatan Taub wrote:
> I don't think so.
> Once the Thread has died, you need to create a new object.
That is correct. Threads cannot be restarted in Java.
If you want to run something in a separate thread multiple times, you
can encapsulate the functionality in an object that implements the
Runnable interface, and then create a Thread each time you want to run
it using the Thread(Runnable) constructor.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.15a0ac8330420398a2d8@forums.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b33083e_2@dnews> <3b33431f$3_2@dnews> <3b3624e8_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-25 00:39:44 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.language Subject: Re: newbie: Threads Date: Mon, 25 Jun 2001 03:31:11 -0400 Message-ID: <MPG.15a0ac8330420398a2d8@forums.borland.com> References: <3b33083e_2@dnews> <3b33431f$3_2@dnews> <3b3624e8_1@dnews> X-Newsreader: MicroPlanet Gravity v2.30 NNTP-Posting-Host: 209.92.40.60 X-Trace: dnews 993454270 209.92.40.60 (25 Jun 2001 00:31:10 -0700) Lines: 20 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews