Package dev.nm.misc.parallel
Class Mutex
- java.lang.Object
-
- dev.nm.misc.parallel.Mutex
-
public class Mutex extends Object
Provides mutual exclusive execution of aRunnable.
-
-
Constructor Summary
Constructors Constructor Description Mutex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(Runnable runnable)Therunnableis executed under synchronization of thisMutexinstance.
-
-
-
Method Detail
-
execute
public final void execute(Runnable runnable)
Therunnableis executed under synchronization of thisMutexinstance.- Parameters:
runnable-
-
-