Does a thread uses cpu during sleep() | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Does a thread uses cpu during sleep()

2nd Jul 2020, 8:00 AM
Vishal Vishwajeet
Vishal Vishwajeet - avatar
2 Réponses
+ 2
Science is Cool sleep method use to stop the execution of thread for sometime. So no.
2nd Jul 2020, 8:13 AM
A͢J
A͢J - avatar
0
" This is an efficient means of making processor time available to the other threads " https://docs.oracle.com/javase/tutorial/essential/concurrency/sleep.html
2nd Jul 2020, 1:33 PM
zemiak