I am working on an existing Java EE Multi-threading application.
I am unable to understand this thing on to my Application. There is one thread named UserThread, and in its run method’s while(true) condition it reads data from a location and pushes the data to a Websocket. After that the Thread sleeps for 1000 seconds.
Why is this Thread.sleep() useful?
Sounds like it’s just being used to throttle the reads and/or writes to avoid sending too many requests at once.