Top "Java.util.concurrent" questions

Java package which contains utility classes commonly useful in concurrent programming.

Is there a Mutex in Java?

Is there a Mutex object in java or a way to create one? I am asking because a Semaphore object …

java mutex semaphore java.util.concurrent concurrent-programming
Synchronization vs Lock

java.util.concurrent API provides a class called as Lock, which would basically serialize the control in order to access …

java multithreading concurrency synchronization java.util.concurrent
WAITING at sun.misc.Unsafe.park(Native Method)

One of my applications hangs under some period of running under load, does anyone know what could cause such output …

java multithreading concurrency java.util.concurrent
Hystrix command fails with "timed-out and no fallback available"

I've noticed that some of the commands in my application fail with Caused by: ! com.netflix.hystrix.exception.HystrixRuntimeException: GetAPICommand …

java java.util.concurrent hystrix
Java 8: Parallel FOR loop

I have heard Java 8 provides a lot of utilities regarding concurrent computing. Therefore I am wondering what is the simplest …

java for-loop concurrency java.util.concurrent concurrent-programming
FixedThreadPool vs CachedThreadPool: the lesser of two evils

I have a program that spawns threads (~5-150) which perform a bunch of tasks. Originally, I used a FixedThreadPool because …

java multithreading threadpool executorservice java.util.concurrent
How to give name to a callable Thread?

I am executing a Callable Object using ExecutorService thread pool. I want to give a name to this thread. To …

java multithreading executorservice java.util.concurrent
Thread safe Hash Map?

I am writing an application which will return a HashMap to user. User will get reference to this MAP. On …

java multithreading hashmap java.util.concurrent
Is ConcurrentHashMap totally safe?

this is a passage from JavaDoc regarding ConcurrentHashMap. It says retrieval operations generally do not block, so may overlap with …

java multithreading synchronized java.util.concurrent
Difference between shutdown and shutdownNow of Executor Service

I want to know the basic difference between shutdown() and shutdownNow() for shutting down the Executor Service? As far as …

java java.util.concurrent