Re: Stopping multiple threads.
Friday, February 1, 2002 04:13 AM
public void stop()
stop = true; // boolean value
method like this. When your reader loops trying to read data check this flag and exit if true. If the reader is currently blocked waiting for data just close the socket and the reader will throw an exception. It will then check this flag and then exit. To be safe you should have another flag to indicate whether the shutdown was successfull.