cancel

fun cancel()(source)

Synchronous teardown — cancels the service scope (and its child BLE connection) without suspending.

Use this from ViewModel.onCleared() where viewModelScope is already cancelled and launching a new coroutine is not possible.