Check for STA and NA when deciding to call directly or post a callback.#459
Check for STA and NA when deciding to call directly or post a callback.#459kennykerr merged 6 commits intomicrosoft:masterfrom
Conversation
|
The logic here is a little confusing and the PR misses the subtlety, but I think we can make it work. The So I suspect you can get the desired behavior without perturbing unintended behavior simply by updating For example, the PR breaks the following sample: IAsyncAction b()
{
co_await resume_background();
}
IAsyncAction a()
{
co_await b();
}
int main()
{
a().get();
} |
|
Pushed some changes. |
|
Looks good. Just checking - we've confirmed this actually works with the API in question? |
Correct, this change make the API in question work as expected. |
… into user/jlaans/458
|
And you have a clean pass from |
|
Checking for STA when deciding to post a callback or call directly, doesn't handle the case where the apartment type is APTTYPE_NA. This PR also adds a check for NA.
Fixes #458
/cc @oldnewthing @kennykerr