async/await support
See original GitHub issueI guess we need to modify these lines:
- https://github.com/dry-python/returns/blob/master/returns/functions.py#L34
- https://github.com/dry-python/returns/blob/master/returns/functions.py#L49
And add await
there. And it should be working.
I am also not sure about types and .bind
methods that expects callables. Will it work with asyncio
?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
async function - JavaScript - MDN Web Docs - Mozilla
Async functions can contain zero or more await expressions. Await expressions make promise-returning functions behave as though they're ...
Read more >Async functions | Can I use... Support tables for HTML5, CSS3 ...
Async functions make it possible to treat functions returning Promise objects as if they were synchronous. Usage % of. all users, all tracked,...
Read more >Async functions: making promises friendly - web.dev
If you use the async keyword before a function definition, you can then use await within the function. When you await a promise, ......
Read more >Async/await - The Modern JavaScript Tutorial
asynchronous code returns a value, but it wraps the value in a Promise, so that the caller can use it to specify the...
Read more >JavaScript Async - W3Schools
ECMAScript 2017 introduced the JavaScript keywords async and await . The following table defines the first browser version with full support for both:...
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 FreeTop 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
Top GitHub Comments
Partial support is introduced since
0.6.0
In my opinion, we should implement the first option and postpone awaitable results to the moment in the future when someone will come with a meaningful real-world example of its usage.
To support
pipeline
andsafe
decorators we shouldinspect
module for example.await
in it.