Join Slack
Powered by
Hello guys! What is the better dispatcher in corou...
# android
o
Oleh Ponomarenko
02/05/2019, 2:50 PM
Hello guys! What is the better dispatcher in coroutines for background broadcasting some data via Bluetooth? I use "
Dispatchers.IO
". Is it ok? I've already read this page -
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/
I just need your advice)
t
tapchicoma
02/05/2019, 3:11 PM
yes, sending data over Bluetooth is I/O operation, so
<http://Dispatchers.IO|Dispatchers.IO>
is a right choice
✔️ 1
tapchicoma
02/05/2019, 3:13 PM
I advice you also read this article:
https://hellsoft.se/https-hellsoft-se-understanding-cpu-and-io-bound-for-asynchronous-operations-6511c70a5685
👍 5
o
Oleh Ponomarenko
02/05/2019, 3:16 PM
Thanks
f
fahadayaz
02/05/2019, 4:07 PM
Very useful article. Thanks!
15
Views
Open in Slack
Previous
Next