Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!

Comp Man

Greenhorn
+ Follow
since May 01, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Comp Man

Hey everyone. I'm new to Java, so I thought a cool way to learn would be to write a chat client. I'm happy to report that it's going pretty good, except for one major problem.

When I'm ready for the program to connect, it'll start up a thread for handling socket communications. The thread will start by sending the initial handshake and enter a loop for incoming messages. The problem is that it starts consuming processor avalibility, so that nothing else will work until I exit the program. How do I prevent this from happening?

Thanks!