coroutine Questions
3
Solved
I am wondering what the best practices are for writing coroutines in Python 3. I am developing basic methods which should accept some input (using the .send() method), perform computations on this ...
2
In 2020 a lot of android developers are talking about Kotlin Coroutines. I'm trying to understand it and how coroutines can help me in my project.
So my question: is there analogue in Coroutines f...
Caren asked 5/2, 2020 at 11:54
7
Solved
What are the differences between a "coroutine" and a "thread"?
Mince asked 20/12, 2009 at 3:5
2
Solved
From the well-known C++ coroutine library (search "Don't allow any use of co_await inside the generator coroutine." in the source file generator.hpp), and from my own experiments, I know ...
Crossways asked 30/12, 2021 at 18:53
1
Solved
I am using Python 3.10 and I am a bit confused about asyncio.create_task.
In the following example code, the functions are executed in coroutines whether or not I use asyncio.create_task. It seems ...
Gurrola asked 26/4, 2023 at 6:51
4
Solved
I'm curious about the internal working of a coroutine when suspended on the main thread. The real question is how to log a suspended function which is a coroutine on the main thread. Where exactly ...
4
This question is not about coroutines in C++20 but coroutines in general.
I'm learning C++20 coroutines these days. I've learnt about stackful and stackless coroutines from Coroutines Introduction....
Julieannjulien asked 18/7, 2020 at 11:5
3
Support for coroutines in Lua is provided by functions in the coroutine table, primarily create, resume and yield. The developers describe these coroutines as stackful, first-class and asymmetric.
...
Mitrailleuse asked 24/9, 2016 at 11:32
5
Solved
I have a Single from RxJava and want to continue working with a Deferred from Kotlin Coroutines. How to accomplish that?
fun convert(data: rx.Single<String>): kotlinx.coroutines.Deferred<...
Bandeau asked 16/5, 2020 at 12:50
6
Solved
I am translating our current application from Java to Kotlin and I came upon this problem.
The java implementation used to use threads to transfer data from the server.
It would create about 100 ...
6
Solved
I have some code below. Delay (3000) is just replacement for a long loop (or cycle). I’m expecting that after completion of loop println(res) will print “Some String” and then enable button. But in...
Nevins asked 26/12, 2019 at 17:46
10
Solved
I'm trying to use kotlin coroutines to access room database by the method described here, added the plugin and dependency, and enabled kotlin coroutines in gradle.
in gradle file:
kotlin {
expe...
Heeltap asked 8/2, 2018 at 20:41
3
Solved
I'm currently trying to understand IEnumerator & Coroutine within the context of Unity and am not too confident on what the "yield return null" performs. At the moment i believe it basically pa...
Wicked asked 18/1, 2017 at 13:5
5
Solved
What is the equivalent of yield return null; in Coroutine (that run each frame at Update) in an async method ?
The nearest I got to find is await Task.Delay(1);, but it DO NOT run every frame.
pr...
Eligibility asked 23/12, 2017 at 13:38
3
Solved
Generator based coroutines have a send() method which allow bidirectional communication between the caller and the callee and resumes a yielded generator coroutine from the caller. This is the func...
Peritoneum asked 26/12, 2015 at 6:25
6
Solved
i just created an app where my function getdata() call every second to fetch new data from server and updateui() function will update view in UI i don't use any asynctask or coroutine in my app i w...
1
Solved
I've seen conflicting views on whether Python coroutines (I primarily mean async/await) are stackless or stackful.
Some sources say they're stackful:
http://www.open-std.org/jtc1/sc22/wg21/docs/pa...
Moskva asked 13/12, 2021 at 18:31
2
Solved
I am a beginner studying coroutines.
Not exactly, but I have a little understanding of what a coroutine is.
The suspend function is also difficult, but with a little understanding.
I'm studying ste...
Bacillary asked 7/2, 2022 at 20:36
3
Solved
I'm trying to write a request handler to help me send request in async mode. It prompt when I close the python terminal with Ctrl+D or exit()
It shows sys:1: RuntimeWarning: coroutine was never awa...
Sexagesima asked 19/4, 2019 at 5:8
2
Solved
let me ask
I use kotlin coroutine
@OptIn(DelicateCoroutinesApi::class)
GlobalScope.launch {
displaySura()
}
and in the build tab showing warning:
This annotation should be used with the compiler ...
Martella asked 21/4, 2022 at 8:49
9
Solved
The concept of a coroutine sounds very interesting, but I don't know, if it makes sense in a real productive environment? What are use cases for coroutines, where the coroutine implementation is mo...
2
Solved
#include <coroutine>
#include <string>
template<typename T>
struct Awaiter final {
bool await_ready() const { return false; }
void await_suspend(std::coroutine_handle<>)...
Meridithmeriel asked 6/6, 2021 at 14:13
3
Solved
I'm trying to retrieve a single entry from the Database and successfully getting the value back in my View Model with the help of viewModelScope, but I want this value to be returned back to the ca...
5
Solved
Is there a way to return value from a coroutine scope? for example like this:
suspend fun signUpUser(signUpData : SignUpUserRequest) : User {
CoroutineScope(Dispatchers.IO).launch() {
val respon...
Cooley asked 18/7, 2020 at 7:36
3
Solved
When using Boost.Asio stackful coroutines, how can I "manually" yield so that another coroutine or async operation has a chance to run? For example, I need to perform a long computation before send...
Millennium asked 30/9, 2014 at 18:17
© 2022 - 2025 — McMap. All rights reserved.