public class Blockers
extends java.lang.Object
Utility classes for blocking computations.
Constructor and Description |
---|
Blockers() |
Modifier and Type | Method and Description |
---|---|
static void |
acquireSemaphore(java.util.concurrent.Semaphore s)
Acquire a semaphore, coordinating with the fork-join pool if one is running.
|
static void |
enterMonitor(Monitor m)
Enter a monitor, releasing coordinating with the fork-join pool.
|
public static void enterMonitor(Monitor m) throws java.lang.InterruptedException
Enter a monitor, releasing coordinating with the fork-join pool.
m
- The monitor to enter.java.lang.InterruptedException
public static void acquireSemaphore(java.util.concurrent.Semaphore s) throws java.lang.InterruptedException
Acquire a semaphore, coordinating with the fork-join pool if one is running.
s
- The semaphore to acquire.java.lang.InterruptedException