terminate

abstract fun terminate()(source)

Immediately terminate the worker, interrupting any processing it might still be doing.

It can be a good practice to explicitly terminate your worker when you're sure you're done with it, as otherwise it may keep running even if you navigate to a different part of your site.