commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farooque Khan" <farooqueahmadk...@hotmail.com>
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.
http://info-spectrum.com
http://farooque.150m.com





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


>
> In message <BAY1-DAV11mYDKFJ2I1000220af@hotmail.com>, "Farooque Khan"
writes:
> >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
access
> to the instance with a critical section.
>
> daniel
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message