suggestions needed# Java - 爪哇娇娃
c*d
1 楼
I am new to Java and have a problem,
I am writing a server program. Whenvever a client connects, it will create a
new thread for that client. The new thread does some work, and goes into
sleep. Every 5 minutes, all the threads wake up and send data out to clients.
How can I let all threads sleep and wake all of them up?
Any suggestions are welcome. thanks.
I am writing a server program. Whenvever a client connects, it will create a
new thread for that client. The new thread does some work, and goes into
sleep. Every 5 minutes, all the threads wake up and send data out to clients.
How can I let all threads sleep and wake all of them up?
Any suggestions are welcome. thanks.