shutdown

suspend fun shutdown(mode: TransactionWorkerShutdown = TransactionWorkerShutdown.Drain)

Drains queued submissions or cancels them immediately, then waits for termination.