java - How to wait several objects -


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

Popular posts from this blog

android - How can I execute default sms app? -

jquery .css('text-decoration') doesn't work from parents -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -