In Java, the thread that calls Thread.sleep, sleeps! Q: how do you hibernate thread B in thread A?

1. Both An and B threads run simultaneously in an infinite loop.
2.How does thread A let thread B sleep for a while.
3.B Thread continues to loop indefinitely after hibernation.

Mar.17,2021

in A thread, let the object of B thread sleep


in A thread (preferably his run method), call threadB.sleep () with the reference of B thread.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e47274-44c11.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e47274-44c11.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?