How to know if other threads have finished?

前端 未结 12 1690
野性不改
野性不改 2020-11-22 14:05

I have an object with a method named StartDownload(), that starts three threads.

How do I get a notification when each thread has finished executing?

12条回答
  •  北海茫月
    2020-11-22 14:35

    You could also use SwingWorker, which has built-in property change support. See addPropertyChangeListener() or the get() method for a state change listener example.

提交回复
热议问题