Binding doesn't support coroutines
See original GitHub issueI was excited to try out the binding block in our codebase but it doesn’t support suspending functions. We currently use Result heavily with coroutines so this was a bit of a bummer. Is there any likelihood of this being added in the future? I’m not sure if it’s out of scope for this project. I’m happy to raise a PR if you think it would be a worthwhile addition.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:21 (12 by maintainers)
Top Results From Across the Web
Two-way databinding not working when triggered inside ...
In my case, the problem was solved by setting the value of the lifecycleOwner property in the following code. The data binding is...
Read more >Exception when trying to use Kotlin coroutines. - MSDN
I have an Android Binding Library with Kotlin code, and it exits whenever it hits ... StdLib doesn't include support for Kotlin coroutines....
Read more >Best practices for coroutines in Android
This page presents several best practices that have a positive impact by making your app more scalable and testable when using coroutines.
Read more >Coroutines basics - Kotlin
However, a coroutine is not bound to any particular thread. It may suspend its execution in one thread and resume in another one....
Read more >Blocking threads, suspending coroutines | by Roman Elizarov
However, it does not over-allocate threads, since that would not help to execute CPU-bound tasks faster, but only waste memory.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@badvok666 @ditn regarding
It looks like when we bump this lib to 1.4 that will no longer be an issue, see section “Suspend conversion on callable references”:
https://kotlinlang.org/docs/reference/whatsnew14.html#callable-reference-improvements
Released in 1.1.8