-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i wait for another thread operator complete? (coroutine+Thread) #72
Comments
you should wrap it in another You should look at |
There is no reason to use |
But there are many Third party librarys,which use call back mode in their thread.With thread safe Wait result obj,the code will wrap easy! |
Libraries that provide a single callback are easy to wrap for use with coroutines. It is explained here: https://github.com/Kotlin/kotlin-coroutines/blob/master/kotlin-coroutines-informal.md#wrapping-callbacks |
I use something similar with RxJava, for tests:
|
I want to write some coroutine code which will kill callback hell,with kotlinx.coroutines.Codes like this:
But which complie error
I know the error message means,But i want to ask if any object that can operator in another thread an can wait result in the coroutine?So i Can write sequence code which runs under callback!
The text was updated successfully, but these errors were encountered: