ExecutorService in Java

Executor Framework In simple Java applications, we do not face much challenge while working with a small number of threads. If you have to develop a program that runs a lot of concurrent tasks, this approach will present many disadvantages such as lots of boiler plate code (create and manage threads), executing thread manually andContinue reading “ExecutorService in Java”

Java ThreadLocal

Prerequisite Java Multithreading Please read the previous blog for detailed information. Java.lang.ThreadLocal class in Java This class provides thread local variables that can only be read and written by the same thread. This implies that even if two threads are executing the same code, and the code has a reference to the same ThreadLocal variable, theContinue reading “Java ThreadLocal”

Multithreading in Java

Prerequisite Threads A thread is a single sequential flow of execution of the tasks of a process. A process if a program in execution and a thread is a lightweight process and the smallest unit of CPU utilization. Thus a thread is like a miniprocess. Each thread has a thread Id, a program counter, aContinue reading “Multithreading in Java”

Design a site like this with WordPress.com
Get started