Does a thread uses cpu during sleep() | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Does a thread uses cpu during sleep()

2nd Jul 2020, 8:00 AM
Vishal Vishwajeet
Vishal Vishwajeet - avatar
2 Antworten
+ 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