https://kotlinlang.org logo
#coroutines
Title
# coroutines
k

kingsley

03/18/2017, 9:16 PM
Meanwhile, looking at your code, you shouldn't be using the blocking
sleep
. There is a suspending
delay
that won't block
Also, you seem to be blocking the initial thread and returning your
List<Message>
anyway. That isn't taking advantage of the coroutine's suspending functionality
s

suresh

03/18/2017, 10:14 PM
restTemplate.getForObject
is also a blocking call.
6 Views