Class Disposer
java.lang.Object
ch.raffael.meldioc.util.concurrent.Disposer
A simple utility that helps to thread-safely dispose lazy things.
General usage:
- call
onDispose()to add hook to be run when disposing things - call
dispose()to run all added hooks and remove them
onDispose() and dispose() synchronize on a lock that may be
passed to the constructor. By default, this Disposer instance will be used
for locking.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Disposer
public Disposer() -
Disposer
-
-
Method Details
-
onDispose
-
onDispose
-
onDispose
-
dispose
public void dispose() -
lock
-