Java multithreaded programming (3) communication between threads

  1. Wait/Notify Mechanism

  1. Inter-thread communication without waiting/notifying mechanism

  2. What is the wait/notify mechanism

  3. Implementation of wait/notify mechanism

  4. The method wait() lock release and notify() lock is not released

  5. When the interrupt method encounters the wait method

  6. Notify only one thread

  7. Wake up all threads

  8. The use of the method wait(long)

  9. Notifying too early

  10. Wait for the condition of wait to change

  11. Producer/Consumer Pattern Implementation

  12. Inter-Thread Communication via Pipes: Byte Streams

  13. Inter-thread communication via pipes: character streams

  14. Actual combat: cross backup of waiting/notification

  Second, the use of the method join

  1. The foreshadowing before the learning method join

  2. Use the join() method to solve

  3. Method join and exception

  4. Use of the method join(long)

  5. The difference between the method join(long) and sleep(long)

  6. The code behind the method join() runs ahead of time: an accident occurs

  7. The code behind the method join() runs ahead of time: explaining the unexpected

  Third, the use of class ThreadLocal

  1. Method get() and null

  2. Verify the isolation of thread variables

  3. Solve the problem that get() returns null

  4. Verify the isolation of thread variables again

  Fourth, the use of the class InheritableThreadLocal

  1. Value inheritance

  2. Value inheritance and then modification

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325158433&siteId=291194637