True Async / Await Support
See original GitHub issueJust a brief question as I didn’t see documentation on testing async code. Is this the correct way to do so in MSpec?
Because of = async () => await EventManager.Raise(_Event).Await().AsTask;
or
Because of = () => EventManager.Raise(_Event).Await();
If so, why was this decision made over simply detecting Task
or Task<T>
return types and waiting till completion before invoking It
delegates. I understand void
return types make dealing with SynchronizationContext
a pain, but the majority of the time, developers shouldn’t be writing async void methods to begin with. Is this more difficult to do than I’m alluding or is it more-so related to backwards compatibility?
It certainly feels worse not trusting the calling method (MSpec) to await.
Issue Analytics
- State:
- Created 9 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
async function - JavaScript - MDN Web Docs - Mozilla
The async function declaration creates a binding of a new async function to a given name. The await keyword is permitted within the...
Read more >Async/await
There's a special syntax to work with promises in a more comfortable fashion, called “async/await”. It's surprisingly easy to understand and ...
Read more >Python async await on condition being true
I'm trying to write an asynchronous method to run a query on hive (using pyhive). Now, pyhive does support asynchronous querying, I have...
Read more >Asynchronous support
Asynchronous support ¶. Django has support for writing asynchronous (“async”) views, along with an entirely async-enabled request stack if you are running ...
Read more >Even with async/await, raw promises are still key to writing ...
Writing truly concurrent code is occasionally not possible, or easy, with pure async/await. Writing code for the browser? Isn't that a solved problem...
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
I’m currently maintaining mspec, and it’s on the plans for
2.0
, but nothing concrete yet, follow here: #293Hi, I’m not involved anymore with mspec. I wasn’t for a long time. Maybe someone else can comment here