gsala
11/09/2020, 12:00 PMCoroutineScope
to a function, instead of making the function suspendable and then call coroutineScope {}
inside?
What I'm going for:
fun connect(
device: BluetoothDevice,
connectionScope: CoroutineScope,
): StateFlow<BleConnectionState>
I want to have the consumers of this API decide what the lifetime/scope of the BLE connection should bemarstran
11/09/2020, 12:19 PMfun CoroutineScope.connect(device: BluetoothDevice): StateFlow<BleConnectionState>
gsala
11/09/2020, 4:35 PMwasyl
11/09/2020, 8:15 PM