best approach?...creating new Thread or using Thread pool
Hi,
since i didn't get correct reply, i am posting it again.Please sorry for that.
Assume you will receive 100 request/min to process and each request will take 2 mins. the request will keep on coming.
for this assumption, Please can anyone tell me which approach is best? Creating a new Thread for each request or using Thread pool. can you justify with analytical data(like time taken to execute).
and also please tell me when not to use Thread pool.
Thanks...
Babu Shanmugham
[522 byte] By [
babusha] at [2007-11-27 11:22:17]

> Hi,
> since i didn't get correct reply, i am posting it
> again.Please sorry for that.
>
If you have a preconception about what "correct" is, why even ask?
And why do you think you will get your "correct" answer instead of something else if you just ask often enough?
hi,
it's not like i know the answer and i am asking you. hope you have mistaken me.
Theoritically i know the difference between them. But what i don't know is the analytical proof for that like comparing time taken for both.
hope you my question. Please give me suggestion for that.
Thanks...
Babu Shanmugham
> well he won't find anything here except this
> meta-discussion ...
which may well be more interesting than the issue he's pondering :)
As to that issue, given the amount threads and the time they'll be running it probably doesn't matter.
Threadpools are great when you have a lot of operations, each of which takes a short time to run compared to the time it takes to create a thread.
As your operations run for a long time, the benefits of using a threadpool are largely negated, and replaced by higher complexity.
> Please give me suggestion for that.
I did that in your original thread, where this entire discussion should have stayed.
ejpa at 2007-7-29 14:53:57 >
