Working with Parallel Streams
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 …
Java ThreadLocal
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 …
Java Volatile Keyword
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 …
Understanding Executors
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 …
About ThreadFactory
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. …