Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果主线程在 child 完成工作之前退出,并且 child 尝试通知,会发生什么?
谢谢
如果您调用notify()没有其他线程调用的对象wait(),则该notify调用将无效。
notify()
wait()
notify