[concurrency-interest] Need to kill a single working thread, rather than killing the application

Chirag Shah chirag_r_shah at rediffmail.com
Fri Dec 15 18:03:12 EST 2006


I am new to TPE. I have a question. 

I have a Multithreaded Java Application running on SunOS Sparc. 
Which open a socket connection, get the request and pass it to the worker.  The worker will read/write the file and send the data back to the client. Rightnow we have setting of min 300 Thread and max 1000 Thread. 

My basic requirement is, if a thread takes more than couple of sec eg 5 seconds, I want that thread to stop doing the task, ie terminate that request and start serving other requestm, which is in the queue. b'cos that single task may hung my whole application. I can kill a single request rather than killing the whole application. 

Would you please give me the best idea?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20061215/6f18a284/attachment.html 

More information about the Concurrency-interest mailing list