From: Mark Probert Date: 2004-11-23T12:43:03+09:00 Subject: Re: Subtle bug: Telnet / socket / thread? hi .. James Edward Gray II wrote: > >> so, i can only assume that one of the other threads is writing to the >> this string. Is this possible? Or is there some other way that the >> passed string can become corrupt? > > This sounds like the Threads are sharing this String resource. Did it > exist outside of the Threads when you created them? If so, did you > pass into the Thread with something like: > I don't think so. The telnet object is completely wrapped in a class and each instance of the class is unique to each thread (it is constructed inside the thread). There are no class variables. And the variables leading into the @conn.write() call are all local. This is tricky 'cause the problem is intermittent. Thanks, -mark.