onInterrupt

infix fun onInterrupt(onInterrupt: Runnable): DynamicTask

Runs when the task is interrupted (finished but not by onFinish).


protected open override fun onInterrupt()

Finalising function that will be called after onFinish in the event this task is finished via a call to finish or finishNow. Override to add your own callback.