telnetlib thread-safe?

Fredrik Lundh fredrik at pythonware.com
Thu Aug 24 15:04:43 EDT 2006


Jerry wrote:

>> define thread-safe.  how do you plan to use it?
> 
> I would like to write a program that spawns ~10 threads.  Each thread
> would get a host to connect to from a Queue object and run then do it's
> thing (i.e. connecting to the host, running some commands, returning
> back a success or fail based on the results).
> 
> I just want to make sure that telnetlib is safe for this.

as long as each thread uses it's own Telnet instance, that should be no 
problem at all (as far as I can tell).

</F>




More information about the Python-list mailing list