🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Unique Thread for each methods

#7842
From: Nabin Thomas
Date: Thu, 17 May 2001 18:24
68 lines
2798 bytes
This is a multi-part message in MIME format.
--------------5124A0BAA005620FDAAA31A6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

You cannot directly do this
But you can create separate Classes (Threads) with run() method overridden to
implement the desired task and Use the myClass as just an interface that creates
and calls start() on these threads.


ArShAm wrote:

>     Hi there
> In this class :
>
> public class myClass extends Thread // and for implementing Runnable
> {
>     ......
>     Thread M1,M2,M3,M4; //  M1 for method1 , M2 for method2 ,etc.
>
>     public void method1()
>     {
>     .....
>     }
>
>     public void method2()
>     {
>     .....
>     }
>
>     public void method3()
>     {
>     .....
>     }
>
>     public void method4()
>     {
>     .....
>     }
>     .........
> }
>
> How to make unique threads for each methods that when ever I need , start or
> stop them?
>
> Thanks
>     ArShAm

--------------5124A0BAA005620FDAAA31A6
Content-Type: text/x-vcard; charset=us-ascii;
 name="viewmycard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Nabin Thomas
Content-Disposition: attachment;
 filename="viewmycard.vcf"

begin:vcard 
n:Thomas;Nabin
x-mozilla-html:TRUE
adr:;;;;;;
version:2.1
email;internet:DONOTSPAMME.nabinthomas@REMOVETHIShotmail.comANDTHISTOO
note;quoted-printable:REMOVE the Capitalised letters in my email ID given in this card=0D=0A=0D=0AFeel free to contact me thru e-mail or MSN Mssenger =0D=0A if required but DONOT SPAM=0D=0A=0D=0A
fn:Nabin Thomas
end:vcard

--------------5124A0BAA005620FDAAA31A6--
Technical Details
Message-ID: <3B041778.1F1130E8@foremail.nospamplease>
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!europa.netcrusader.net!192.148.253.68!netnews.com!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b02850a$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,d62c14e6e0c1b82e
X-Google-Attributes: gidf74b3,public
X-Google-Thread: f7754,d62c14e6e0c1b82e
X-Google-Attributes: gidf7754,public
X-Google-ArrivalTime: 2001-05-17 22:42:03 PST
Message-ID: <3B041778.1F1130E8@foremail.nospamplease>
Date: Thu, 17 May 2001 23:54:56 +0530
From: Nabin Thomas <viewmycard@foremail.nospamplease>
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language,borland.public.jbuilder.students
Subject: Re: Unique Thread for each methods
References: <3b02850a$1_2@dnews>
Content-Type: multipart/mixed;
 boundary="------------5124A0BAA005620FDAAA31A6"
NNTP-Posting-Host: 202.9.186.14
X-Trace: dnews 990163706 202.9.186.14 (17 May 2001 22:28:26 -0700)
Lines: 71
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!europa.netcrusader.net!192.148.253.68!netnews.com!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews