Home  >  Q&A  >  body text

thread - java多线程之间协作运行时没有任何结果没有任何错误信息,麻烦看下代码?

PHP中文网PHP中文网2741 days ago677

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:07:02

    I read it wrong, your output is not necessarily correct. If wait is executed, there will be no output, and the logic is written incorrectly. Take out the content in else.

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 10:07:02

    while(condition){
        wait();
    }

    reply
    0
  • Cancelreply