Threads
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
hello everyone
i am having two Thead objects declared as bellow
final Thread t1=new Thread(new Runnable()
{
public void run(){}
});
final Thread t2=new Thread(new Runnable()
{
public void run(){
t1.start();
}
});
t1.start();
t2.start();
wat i m facing is the thread t1 is not getting started from within t2
if i want to do so wats the way out? y is this code not working
Thanx
i am having two Thead objects declared as bellow
final Thread t1=new Thread(new Runnable()
{
public void run(){}
});
final Thread t2=new Thread(new Runnable()
{
public void run(){
t1.start();
}
});
t1.start();
t2.start();
wat i m facing is the thread t1 is not getting started from within t2
if i want to do so wats the way out? y is this code not working
Thanx
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
How do you say it is not started.
Also, you are trying to start the same thread twice, obviously that won't work?
Also, you are trying to start the same thread twice, obviously that won't work?
ASCII silly question, Get a silly ANSI.
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
As Stuart pointed out, you are trying to call start twice on the same thread, and you can't do that.
But you can pass the same instance of Runnable to a new thread...
But you can pass the same instance of Runnable to a new thread...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Vrishal Likhite
Greenhorn
Posts: 18
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hey marc thanx for ur reply
the code u sent might just prove helpfull to me in my work
the code u sent might just prove helpfull to me in my work
| Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |








