[java] run 2 threads simultaneously
- by lamsaitat
hi all,
in the case of an IM client.
i have made 2 separate threads to handle sending packets (by std io) and receiving packets.
the question is how to make these 2 threads run simultaneously so that i can keep prompting for input while at the same time be ready to receive packets at any time?
i have already tried setting a timer but the data is always lost receiving.