I'm writing a class that reads from a BluetoothSoc...
# coroutines
b
I'm writing a class that reads from a BluetoothSocket and passes the data on. In the past I've just used a
HandlerThread
and passed it a
Runnable
that has a
while()
loop for continuously calling the blocking
read()
. Is there a better way with coroutines? Should I just stick to
HandlerThread
(or maybe an
Executor
)?