multithreding
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   dave_sullins
Posted On:   Thursday, December 11, 2003 09:47 AM

Hey guys, I'm doing three HTTP POSTs simulataneously(concurrently) using MultiThreading. Each HTTP POST opearation will take a different time for execution. And I wrote this sample snippet of code. But I am unable increase the application speed with this code. Can any body tell me that how can i increase the speed of my application with all the three HTTP posts runnung concurrently. Thanks in advance t1 = new SampleThread(postAll); t1.start(); t2 = new SampleThread(postAll2); t2.start(); t3 = new SampleThread(postAll3); t3.start(); //Thread.currentThread().sleep(100); try{ System.out.println("Waiting for threads to finish&q   More>>

Hey guys,
I'm doing three HTTP POSTs simulataneously(concurrently) using MultiThreading. Each HTTP POST opearation will take
a different time for execution. And I wrote this sample snippet of code. But I am unable increase the application
speed with this code. Can any body tell me that how can i increase the speed of my application with all
the three HTTP posts runnung concurrently. Thanks in advance


t1 = new SampleThread(postAll);
t1.start();

t2 = new SampleThread(postAll2);
t2.start();

t3 = new SampleThread(postAll3);
t3.start();


//Thread.currentThread().sleep(100);

try{
System.out.println("Waiting for threads to finish");
t1.join();
t2.join();
t3.join();
}
catch(Exception e) {
throw new Exception(e);
}

public void run() {

startTime = System.currentTimeMillis();

try {
Thread.currentThread().sleep(500);
response = post.someExecute(); //is doing a http post


}
catch (Exception ex) {

new Exception(ex);
}

endTime = System.currentTimeMillis();
}

   <<Less

Re: multithreding

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, December 11, 2003 10:55 AM

Get 3 network cards, and 3 network connections? (if the network speed is a limiting factor)

About | Sitemap | Contact