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.
我有一个实现“Runnable”接口的类,并有一个线程在其中运行。但是一旦窗口被最小化,线程就会停止运行,并在最大化窗口时从最小化之前的状态重新启动。即使窗口最小化,我应该如何确保线程的连续运行?
GUI 线程确实如此。您可以创建 Worker 线程来执行耗时的任务。