filmov
tv
Java Multithreading Tutorial | Java Threads Tutorial (All concepts in Single Video)

Показать описание
******************** What is multithreading?
Process of executing multiple threads simultaneously
What is a Thread?
A lightweight sub-process
A smallest unit of processing
Advantages of Multithreading:
Threads are independent so it won’t block users.
Many operations can be performed so it saves more time
It shares same memory
Thread Life Cycle:
Thread can be in five states New, Runnable, Running, Non-Runnable and Terminated.
New state:
A thread begins its life cycle in the new state.
It remains in this state till it gets started.
Runnable state:
A thread moves to runnable state after it has been invoked by start() method.
Threads that are present in this stage are eligible for execution.
Running state:
Thread scheduler decides which thread needs to be executed based on various criteria.
The selected thread(s) get executred by using various resources.
Non-runnable state:
Threads in this state are still alive but not eligible for un at that moment.
Terminated:
Thread is dead when it exits run() method.
#javamultithreading #java #programmingline #rakesh #rake
*******************************************************
Important Links:
Important Links:
*******************************************************
Subscribe my YouTube channels:
*******************************************************