Scenario Based Thread Interview Question : Control Thread Execution | Java Multithreading

Pubblicato il: 14 settembre 2023
sul canale di: Lazy Programmer
1,983
49

In this Video, We have covered a very important scenario which is being asked in the #Interviews multiple times.

Scenario: Suppose There are three #Threads T1, T2 and T3. T1 is responsible for some environment setup. T2 and T3 are the #business logic executing threads. T2 and T3 can only start once T1 has finished its execution and #environment is ready.

Thread.isAlive()
Thread.join()

We have covered the different solutions from a very basic approach and enhancing our solution till we reach the required optimal solution.

You can access the specific topic from the chapters given below

0:00 Agenda
1:20 What is the Problem?
1:47 Basic Code without Handling
5:25 Solution-1: Making T2, T3 Sleep for some time
6:39 Issues with Solution-1
7:50 Solution-2 Using isAlive from Thread Class
9:39 Issues with Solution-2
10:08 Solution-3 Using join Method from Thread Class
11:20 Solution-3 Explanation
12:39 Next Video Agenda

To check out more on the tutorials Topic wise you can follow below links

Links:

Please do checkout other tutorial videos also if required:

Spring Framework:    • Spring Framework  

Java 21:    • Java 21 Features | All you need to know in...  

DevOps:    • DevOps  

Java Design Patterns:    • Design Patterns  

Java 8 Features:    • Java 8  

Core Java Complete Tutorial:    • Core Java Complete Guide  

Interview Preparation for Java:    • Interview Preparation Java  

Python:    • Python  

Linux:    • Linux  

Please do LIKE, Share and SUBSCRIBE

Java multithreading, multithreading in Java, Java threads, multithreading concepts, Java programming, thread synchronization, thread safety, multithreaded applications, Java performance, programming tutorial, core Java, Java development, coding examples, Java concurrency, Java tutorials, learn Java multithreading, Java coding, optimize Java code.


#JavaProgramming #MultithreadingInJava #JavaThreads #ProgrammingTutorial #JavaPerformance #CodeOptimization #virtualthreads #java #new-features #java21 #exceptionhandlinginjava #interview #generics #hashtable #interview #jdbc #java #db #treeset #collectionframework #binarysearchtree #linkedlist #list #arraylist #fibonacci #java #fastest #gc #heap #java #stack #jvm #architecture #exception #interview #exam #interface #abstraction #coding #methodoverloading #methodoverriding #runtime #compiletime #polymorphism #inheritance #constructors #objects #static #eclipse #developer #installation #download #awesome #youtube #youtuber #youtubers #subscribe #youtubevideos #sub #youtubevideo #like #identifiers #operators #variables #typesofvariables #innerclasses #static


In questa pagina del sito puoi guardare il video online Scenario Based Thread Interview Question : Control Thread Execution | Java Multithreading della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Lazy Programmer 14 settembre 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,983 volte e gli è piaciuto 49 spettatori. Buona visione!