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 void
execute(Runnable runnable)
Therunnable
is executed under synchronization of thisMutex
instance.
-
-
-
Method Detail
-
execute
public final void execute(Runnable runnable)
Therunnable
is executed under synchronization of thisMutex
instance.- Parameters:
runnable
-
-
-