-
Notifications
You must be signed in to change notification settings - Fork 264
Check for STA and NA when deciding to call directly or post a callback. #459
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
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();
} |
kennykerr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments.
|
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 |
|
kennykerr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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