Java Multithreading Tutorial for Beginners #6: Thread Status and Join

Published: 23 February 2019
on channel: Genuine Coder
4,292
75

In this chapter, we will talk about checking whether a thread is alive at a point and about waiting for a thread to finish.

Java Thread API provides option to check whether a thread is running or not using the method ThreadObject.isAlive().

Join is used to wait a thread to finish. The join() method waits for a thread to die. It causes the currently running threads to stop executing until the thread it joins with completes its task. Join also provides a overridden method with wait time which when provided will wait for a maximum of given time for the thread to die.

You can find the source code of this chapter in the following GitHub repository.
https://github.com/afsalashyana/Java-...

Website:-
https://www.genuinecoder.com

#Multithreading
#GenuineCoder
#Java


Watch video Java Multithreading Tutorial for Beginners #6: Thread Status and Join online without registration, duration hours minute second in high quality. This video was added by user Genuine Coder 23 February 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 4,292 once and liked it 75 people.