libdill icon indicating copy to clipboard operation
libdill copied to clipboard

Simple async_await

Open GwenNelson opened this issue 5 years ago • 1 comments

Just wondering if something like this could be integrated into the library, it basically allows to await on a coroutine and then get the return value.

My implementation is a quick hack as a proof of concept, see this gist:

https://gist.github.com/GwenNelson/ae315c9aaadf9d4e354b0222958aed84

GwenNelson avatar Mar 21 '20 17:03 GwenNelson

What's the point? If the parent coroutine waits for the child coroutine, it can as well do the work in normal synchronous function, no?

sustrik avatar Mar 22 '20 03:03 sustrik