I have a thread that many objects have to wait from different threads.
@Override Public Zero run () {while (true) {for (background task tasks: actions) {synchronize (work) {if (task.isReady ()) {task.doTask (); }}}}} But this is the stupid use of CPU time how many objects wait for
Please use notifyaAll () to notify () because the notification awakens a thread, as all inform () all Waiting threads arise.
Comments
Post a Comment