SwingWorker not responding

后端 未结 3 1884
攒了一身酷
攒了一身酷 2020-11-28 16:35

What I am trying to do ?

At the click of the Start JButton, the SwingWorker will execute. Inside the doInBackground(

3条回答
  •  猫巷女王i
    2020-11-28 17:02

    comments

    • @kleopatra that's a documentation bug, fixed in jdk7 at least :-), please which of JDKs those bugs are shown as from carousel ....,

    • wait/notify is for thread, SwingWorker is Future, very bad implemented, means without notifiers, you put something to the tube and waiting on another side,

    • seems like as nothing betweens one and second side of this tube, this reason why I tried to invoke Thread, Runnable, Executor(Runnable) from doInBackground, and to ignore publish, process, setProcess

    • another funny issue is to get() and exception(s) all exception, not only 1st. from one and second side of this tube

    • there are two ways how to use SwingWokrer

      1. try to avoid to use SwingWorker

      2. use doInBackground as bridge for workers thread, for output to use publish, process, setProcess, wait for done(), and use done() as notifier for get an exception, notifier that SwingWorker ended

提交回复
热议问题