2 ms·
Kotlin 1.1 supports coroutines what IHMO makes concurrency in a GUI much nicer. For example, it has C# like async/await methods; but more flexible...
by czeidler 9y ago
Kotlin 1.1 supports coroutines what IHMO makes concurrency in a GUI much nicer. For example, it has C# like async/await methods; but more flexible...
- pjmlp 9y agoSo what does it do better than C# 7's async/await?
- czeidler 9y agoIts more flexible and customizable, e.g. works with RxJava, CompletableFuture, JavaFX, Android... Moreover, you have more control where a coroutine is executed. https://kotlinlang.org/docs/reference/coroutines.html https://kotlinlang.org/docs/reference/coroutines.html
- pjmlp 9y agoHave you by any chance seen that I specifically mentioned version 7 of C#? Which allows full control how async/await works, kind of like on the upcoming C++ co-routines, where async/await become syntactic sugar for blessed data structure. EDIT: Should have provided the actual information. The feature as introduced in C# 7 is called "Generalized async return types". https://github.com/dotnet/docs/issues/1756 https://github.com/dotnet/docs/issues/1756
- steedsofwar 9y agoKeep in mind coroutines is very much experimental, things will change.