4- Pausing a Thread
2:35
2 ໄມໂຄຣໂຟນ
2 ບົດ
66 ចម្រៀក
ໄມໂຄຣໂຟນ
ບົດ
-
0:03ບົດ 1: The third class in Java has a sleep method which we can use for pausing the execution of a thread. 60s · Speaker 1
The third class in Java has a sleep method which we can use for pausing the execution of a thread. With this we can simulate a long -running operation, like downloading a file that takes a few seconds. So in our task class, after printing t…
-
1:04ບົດ 2: Pretty easy. 88s · Speaker 2
Pretty easy. Now, after five seconds of delay, let's print another message like download complete. We can also add the thread name for clarity, so plus thread .currentThread .getName. Now, back to our demo class, here we are starting 10 thr…