Package io.javago.sync
Class OnceFunc
java.lang.Object
io.javago.sync.OnceFunc
- All Implemented Interfaces:
Runnable
The
OnceFunc class implements Go's sync.OnceFunc.
A Runnable wrapper that ensures the wrapped Runnable is executed only once.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OnceFunc
Constructs a newOnceFuncthat will wrap the givenRunnable.- Parameters:
func- theRunnableto be wrapped and executed only once
-
-
Method Details