What is correct way to terminate a Worker? Or how ...
# kotlin-native
a
What is correct way to terminate a Worker? Or how currently running job can check if it's time to exit? Like Java's
isInterrupted
.
r
There's
Worker.requestTermination()
but not sure there's anything at the job level. https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.native.concurrent/-worker/request-termination.html
a
Yeah, I know about
requestTermination
, but not sure how to exit from a currently running job. Had to invent own bicycle.