When to call thread.join in a GUI application

好久不见. 提交于 2019-12-02 06:08:13

It is perfectly ok to not call join() if you don't need its functionality to wait for the thread to finish.

By the way: In the main thread of a GUI application (the thread automatically created at start in which all GUI things happen) it is bad practice to call any function that sleeps or waits for anything as the GUI doesn't react (freezes) while waiting.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!