Class CancellableImpl
java.lang.Object
com.github.tonivade.purefun.concurrent.CancellableImpl
- All Implemented Interfaces:
Cancellable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(boolean mayThreadInterrupted) private voidbooleanvoid
-
Field Details
-
lock
-
cancelled
private boolean cancelled -
thread
-
promise
-
-
Constructor Details
-
CancellableImpl
-
-
Method Details
-
updateThread
public void updateThread()- Specified by:
updateThreadin interfaceCancellable
-
cancel
public void cancel(boolean mayThreadInterrupted) - Specified by:
cancelin interfaceCancellable
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
interrupt
private void interrupt()
-