Posted By:
Alex_Kirk
Posted On:
Thursday, September 27, 2001 04:30 PM
I've got a program that starts off by instantiating an object whose purpose in life is to run as a thread, listening on a socket and processing data on that socket. I am able to successfully create my object (whose constructor grabs the socket, which works OK), and I get no errors when I call start() on the object. In fact, the next line of code after the start() call exectues just fine. For some reason, though, nothing in the object's run() method runs at all -- including a basic system.out.println("Running...") call I put in to make sure I'd not fouled anything up. Note that the object extends Thread. You can see the code at www.schnarff.com/gnutonic -- the file
More>>
I've got a program that starts off by instantiating an object whose purpose in life is to run as a thread, listening on a socket and processing data on that socket.
I am able to successfully create my object (whose constructor grabs the socket, which works OK), and I get no errors when I call
start()
on the object. In fact, the next line of code after the
start()
call exectues just fine.
For some reason, though, nothing in the object's
run()
method runs at all -- including a basic system.out.println("Running...") call I put in to make sure I'd not fouled anything up. Note that the object extends Thread.
You can see the code at www.schnarff.com/gnutonic -- the files you want are runGnutonic.java, which creates and
start()
's the thread, and connectionManager.java, which is the object being created.
Thanks in advance for any input you can give. My e-mail is alex@schnarff.com.
Alex Kirk
<<Less