-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cancellation propagation by moving responsability to awaiter #1246
Fix cancellation propagation by moving responsability to awaiter #1246
Conversation
Make propagation tests more reliable at detecting future failures
Looks like await_completed tests fail due to a slight increase in stack size caused by moving most of await_suspend to a non-template member function as to avoid duplicate codegen. Seems to work fine in release mode thanks to compiler optimizations probably eliding/inlining things. Is this an acceptable increase that we need to adjust the test for? Should we disable it in debug builds? |
When you rebase this, please also revert the following change: diff --git a/test/test/async_propagate_cancel.cpp b/test/test/async_propagate_cancel.cpp
index a3e5af749..b2e331929 100644
--- a/test/test/async_propagate_cancel.cpp
+++ b/test/test/async_propagate_cancel.cpp
@@ -132,7 +132,8 @@ namespace
// FIXME: Test is known to segfault when built with Clang.
TEST_CASE("async_propagate_cancel", "[.clang-crash]")
#else
-TEST_CASE("async_propagate_cancel")
+// FIXME: mayfail because of https://github.com/microsoft/cppwinrt/issues/1243
+TEST_CASE("async_propagate_cancel", "[!mayfail]")
#endif
{
Check(Action); |
Yes, it's just a heuristic.
No, because it is common to run unit tests only on debug builds before creating the PR, on the theory that debug builds will catch more errors than retail builds.
Specifically, because template type parameters must have linkage, so they cannot be local classes.
The |
Yeah, I fixed it now.
Looks like build_test_all.cmd uses release mode, which is why I didn't catch it myself when running the tests
Yeah, that was just a off-hand comment that this enables potentially more flexibility (e.g. if we move this out of the impl namespace third party coroutine classes could also opt into cancellation propagation). |
Bug introduced by previous C++/WinRT update Bug fixed by microsoft/cppwinrt#1246
& make propagation tests more reliable at detecting future failures. Relying on a race proved to be not reliable, as shown by #1228 only causing intermittent failures instead of consistent ones.
Some notes:
Fixes #1243