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

qwert_ukg

03/19/2019, 10:05 AM
-.kt
g

gildor

03/19/2019, 10:07 AM
Is it spring? maybe better #spring
in general I would say that you shouldn’t use launch or use Unconfined dispatcher to return post result after you actaully saved data
q

qwert_ukg

03/19/2019, 10:10 AM
Thanks
What i should to use in my case? I want return message id immediately, which user will use to get result of message sending
coze
sendAndSaveResult(uuid, message)
take a lot of time
g

gildor

03/19/2019, 10:18 AM
But this is test, so it should be fine to wait
one more way is have some additional handler that will tell you when data is updated (it may be callback, Deferred or something like that)
q

qwert_ukg

03/19/2019, 10:18 AM
ok. i see
thanks a lot
3 Views