Top "Coroutine" questions

Coroutines are a general control structure whereby flow control is cooperatively passed between two different routines without returning.

What is the difference between "yield return 0" and "yield return null" in Coroutine?

I'm new and a bit confused about "yield". But finally I understand how it worked using WaitForSeconds but I can't …

c# unity3d yield coroutine ienumerator
Async/await as a replacement of coroutines

I use C# iterators as a replacement for coroutines, and it has been working great. I want to switch to …

c# asynchronous async-await coroutine
Proper type annotation of Python functions with yield

After reading Eli Bendersky's article on implementing state machines via Python coroutines I wanted to... see his example run under …

python generator coroutine static-typing mypy
What's the difference between loop.create_task, asyncio.async/ensure_future and Task?

I'm a little bit confused by some asyncio functions. I see there is BaseEventLoop.create_task(coro) function to schedule …

python python-3.x coroutine python-asyncio
Unity Performance - Coroutines vs FSM on update

I just started studying Unity scripting and I'm having a hard time to understand why some people prefer coroutines over …

unity3d coroutine state-machine fsm
When using kotlin coroutines, how do I unit test a function that calls a suspend function?

I have a class like this class SomeClass { fun someFun() { // ... Some synchronous code async { suspendfun() } } private suspend fun suspendFun() { dependency.…

unit-testing kotlin coroutine kotlin-coroutines
In python is there a way to check if a function is a "generator function" before calling it?

Lets say I have two functions: def foo(): return 'foo' def bar(): yield 'bar' The first one is a normal …

python function generator coroutine
Future exception was never retrieved

I have a scraper (based on Python 3.4.2 and asyncio/aiohttp libs) and bunch of links (> 10K) to retrive some …

python exception-handling python-asyncio coroutine aiohttp
Which of coroutines (goroutines and kotlin coroutines) are faster?

Kotlin corutines is sugar for finite state machine and some task runner (for example, default ForkJoinPool). https://github.com/Kotlin/…

go kotlin coroutine goroutine kotlin-coroutines
asyncio - How can coroutines be used in signal handlers?

I am developing an application that uses asyncio from python3.4 for networking. When this application shuts down cleanly, a node …

python signals coroutine python-asyncio