Thread stuck in Thread.join (), although another thread has stopped

Our Java application launches a workflow (using Thread.start()). Soon after, it calls Thread.join()in the workflow. The workflow performs some actions and ends. The first thread leaves the call join()and continues to have fun. Standard material:

Thread t = new WorkerThread();
t.start();

// Blah blah

t.join();

class WorkerThread extends Thread {
    public void run() {
        // Do some stuff
    }
}

At least how it should work, and how it works anyway, we can reproduce. However, we have one client who is constantly facing difficulties.

, PsiProbe, , . , . ( , ). join().

, join() - JVM. - - , ?

3-3-11:

, , , , , : , , join() , .

, .

+3
1

Java , . , .


, JVM (. ), - . , :

  • , .
  • Java , , -, (, ).
  • , "hit", , , , , .
  • ...
    • ; .
    • , , .
    • .

( , , . , , , , , " .)

0

Source: https://habr.com/ru/post/1795388/


All Articles