Category: Concurrency

ConcurrencyJavaSERelevant topics

Working with Parallel Streams

by:

Streams were introduced in Java 8. One of the powerful features of Streams API is that it has built-in concurrency support. Serial Stream is a stream …

ConcurrencyJavaSERelevant topics

Java ThreadLocal

by:

Java ThreadLocal class enables developer to create variables that can only be read and written by the same thread. Thus, even if two threads are executing …

ConcurrencyJavaSERelevant topics

Java Volatile Keyword

by:

The Java volatile keyword guarantees visibility of changes to variables across threads. In a multithreaded applications, where the threads operate on non-volatile variables, each thread may …

ConcurrencyJavaSERelevant topics

Understanding Executors

by:

Executors (and ThreadPools used by them) help meet two of the same needs that Threads do: With Executors, developer handles need 1. ThreadPools help in handling …

ConcurrencyJavaSERelevant topics

About ThreadFactory

by:

java.util.concurrent.ThreadFactory itself is an interface. Its implementations are objects that create new threads on demand. Using thread factories eliminates the need of calls to new Thread. …