How to create parallel threads?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mohan_Jadhav
Posted On:   Wednesday, February 5, 2003 05:54 AM

I want to create three threads that can execute simultaneously. I used the following code:

			
class Foo
{
//..other code here
public void createThreads()
{
for(int i=0;i <3;i++)
{
//..other code here
Thread t = new Thread();
t.start();

//..other code here
}
}
}

But this code would create the threads sequentially. Is there any algorithm to create them parallely?

Re: How to create parallel threads?

Posted By:   Anonymous  
Posted On:   Wednesday, February 5, 2003 06:31 AM

What's wrong with this code??? The threads will execute simultanously.
About | Sitemap | Contact