Tuesday, February 12, 2002 09:41 AM
If you're running on a machine with 1 cpu, you actually cannot run two threads at once (REALLY parallell, that is). What happens, is that every running thread gets the CPU for a little while, and this way, the execution is 'interlaced'
You must start your threads one after the other (simply with the start() method). The parallellism is there because the communication to your server will require I/O of some kind, which will block the requesting thread. Another thread from the group then gets the chance to do it's request, gets blocked also, and so on ...
This way, you can test how performant your server is, because many calls are coming in while others are still being processed !
Hope this helps !