Replace Anko's doAsync, uiThread with kotlinx-coroutines-core lib


#1

Hello,
is it possible to replace Anko’s doAsync and uiTread with something from kotlinx-coroutines-core lib?


#2

Not yet, but the next release of kotlinx.coroutines project will come out with a separate kotlin-coroutines-android module. That will provide a replacement you are looking for.


#3

Thank you!


#4

could you tell, please, when the next release of kotlinx.coroutines will come?


#5

Somewhere this week.


#6

Thank you!


#7

Released. A guide on UI programming with coroutines is here: https://github.com/Kotlin/kotlinx.coroutines/blob/master/ui/coroutines-guide-ui.md


#8

Thank you!


#9

one thing, but offtopic: it would be nice to see examples in javadoc of kotlin libraries(stdlib, etc.). For example, the page https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-job/index.html has been written good, but lacks examples of code; it would be useful to see the sections “Examples” in the docs.


#10

I have not figured out how to provide nice self-contained examples right there. Most of the functions are not independent and are really used in the context of other functions. There are lots of the examples in the guide: https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md As you can see, they are all somewhat on the big side to be included directly into the documentation pages.


#11

maybe in javadoc in section “Examples” put links on the examples?


#12

Great idea, thank you. I can automate that by adding back-references from the reference documentation on functions and classes to the guide sections that mention (link to) them.


#13

Thank you too! and one more thing, by the way: Changelog in javadocs for every class\method\function would be also useful, if it is possible to add; what i mean, for example, is here: http://php.net/manual/en/function.json-encode.php