Skip to content

RitchieEinstein/Multithreading-HandsOn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Multithreading-HandsOn

List of packages :

  1. Demo1 : Showing how to create thread by extending thread class

  2. Demo2 : Showing how to create thread by implementing Runnable interface

  3. Demo3 : Showing how to create thread using anonymous class, which helps in writing a clean code

  4. Demo4 : Showing how shared data can create problem and how to stop other thread sophiscatedly.

  5. Demo5 : Showing the problem caused by interleaving between the threads and its solution using synchronised variable. Every object in java has monitor lock(mutex), if we use synchronized keyword, one thread has to get mutex and only one thread can aquire it at given time

  6. Demo6 : Not ideal to use synchronised in all scenario. Often we need multiple locks to do multiple things How to use lock object in some circumstances to improve and writing much efficient code.

  7. Demo7 : How to use thread pool and get rid of writing the same line of code again to create thread.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%