onDetach

open override fun onDetach()(source)

Called once after the worker run ends, provided onAttach was called.

Release all resources acquired in onAttach here: close files, detach model element observers, drain channels, etc. Exceptions thrown from this method are swallowed by Runner and logged; they do not affect the terminal RunResult. RunHandle.result may resolve before cleanup finishes, so attachments that need an explicit cleanup barrier should expose their own completion signal.