You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another quick question. In this line you use GetAwaiter().GetResult() to run async-over-sync.
I'm always hesitant to do that because the number of edge cases makes my brain hurt. In this case though it should happen only once during app start, so there should not be typical problems like thread pool starvation, deadlocks, etc. - I hope! Also there is not another way I can think of.
Do you feel the current implementation is "safe"?
(Also, it may be better to do Task.Run(() => /*...*/).GetAwaiter().GetResult() instead of ().GetAwaiter().GetResult() ...maybe. I'm not an async expert!)
The text was updated successfully, but these errors were encountered:
Hello again Henk,
Another quick question. In this line you use
GetAwaiter().GetResult()
to run async-over-sync.I'm always hesitant to do that because the number of edge cases makes my brain hurt. In this case though it should happen only once during app start, so there should not be typical problems like thread pool starvation, deadlocks, etc. - I hope! Also there is not another way I can think of.
Do you feel the current implementation is "safe"?
(Also, it may be better to do
Task.Run(() => /*...*/).GetAwaiter().GetResult()
instead of().GetAwaiter().GetResult()
...maybe. I'm not an async expert!)The text was updated successfully, but these errors were encountered: