Is it possible to rewrite this code for better working with processor? I have a class, which does some tasks with fixed periodicy in a separate thread. Sometimes this proces
Your best options are to either use wait()/notify() or to simply switch to ScheduledExecutorService
Proper wait()/notify() usage can be tricky. I highly recommend "Java Concurrency in Practice" to learn more about threading.