-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fixes async / await usage #6921
Conversation
Not the good fix. We should make the methods sync instead. Breaking change... Or at least another overload and we can change our own usages. |
@sebastienros Sorry i don't understand E.g. Maybe you didn't see that the above |
@jtkech maybe we should add extra extension methods to support a They are only extension methods so should be able to work as an overload without breaking anyone. |
Yes, in an old PR i already suggested to make all async around content definition, including In fact, the 2 async / await usage we are fixing are not in the action delegate of Maybe in another PR, here it just fixes an async / await usage in a delegate related to an Hmm, @sebastienros when you said
Did you mean?
Only one character changes the whole meaning, if so i now understand and i will go this way, sorry ;) I didn't do that immediately as before you were not always a fan of making async things around content definition. |
Okay i made the change, so more things are async But a little more changes, so @deanmarcussen if you can check that it still fixes your issue, if you have time ;) As said, there are many other things that are not async around content definition, but at some point it was intentionally kept like this because the content definition record is cached, and to have a less overhead of awaited Update: Okay just tried for the fun to follow your repro With this PR it was working, after reverting it i could repro the same exception |
@jtkech works for me, and I put a Task.Delay(1000) in on one of the queries, and could see it was still properly awaited before the session tried to dispose, so all good. I'm assuming Seb meant So all looks good to me, unless @sebastienros has meant something different :) Yes, I understand about not making the content definitions themselves not async |
I merged it as it fixes an annoying issue |
Fixes #6919