Does anyone know a good way how to do a timeout in...
# kotlin-native
p
Does anyone know a good way how to do a timeout in a worker? How do I cancel the worker job without cancelling the worker itself?
p
I know how cancellation of a coroutine works. I am asking about how to cancel a worker.
Specifically how to cancel the job that a worker is doing without cancelling the whole worker.
m
by workers (in native) you mean Dispatchers?
🚫 1
m
well, I think you have to dispatch your task (your logic) inside a coroutine scope, inside your Worker, then you can cancel your job and the Worker will still running, no?