On Tue, 3 Jun 2003, Riyaz Prasla wrote:

> Hi ,
>   Quick question about multithreading: On a single CPU machine do threads
> work simultaneously or are they scheduled one after another?
>
>   I am having a servlet which has multiple threads created but looks like
> the total amount of time they take is same as the servlet without any
> threads.
>
> Thanks,
> Riyaz
>

Hi,
Having multiple threads for doing one task doesn't reduce the computer
cycles, actually thread switching increases the time.
With a multiple CPU machine I don't know...
On a servlet side threads are usually good for doing some pre-calculation
stuff and when a client steps in, response will be quicker.

-clapu

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to