commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farooque Khan" <>
Subject Re: Is commons Net thread safe?
Date Fri, 02 Jul 2004 04:15:20 GMT
Thanks. yes I was talking about TelntClient class. But my observation was
very different. When I took two separate instances of this class in two
separate threads and launched them at once, they connected properly (to two
different servers), but the streams were closed immediately when I tried to
read the data. When I launched each thread separately (no change in code),
they worked perfectly well. Any hints where the issues lies?

Thanks again,

-Farooque Khan
Sr. Technology Architect,
Info Spectrum India Pvt. Ltd.

----- Original Message ----- 
From: "Daniel F. Savarese" <>
To: <>
Sent: Thursday, July 01, 2004 10:58 PM
Subject: Re: Is commons Net thread safe?

> In message <>, "Farooque Khan"
> >I am particularly interested in telnet component.
> Assuming you're talking about the TelnetClient class; there is no
> mutable state shared between TelnetClient instances.  Therefore separate
> instances can be safely used in separate threads without creating an
> unexpected state.  If you wish to concurrently call methods of a single
> TelnetClient instance from separate threads, you will need to protect
> to the instance with a critical section.
> daniel
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message