We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b2fe0a commit 64659c0Copy full SHA for 64659c0
1 file changed
src/RestSharp/AsyncHelpers.cs
@@ -97,9 +97,12 @@ public void Run() {
97
98
return;
99
100
+ // This method is only called from within this custom context for the initial task.
101
async void PostCallback(object? _) {
102
try {
- await _task().ConfigureAwait(false);
103
+ // Do not call ConfigureAwait(false) here to ensure all continuations are
104
+ // queued on this context, not the thread pool.
105
+ await _task();
106
}
107
catch (Exception exception) {
108
_caughtException = ExceptionDispatchInfo.Capture(exception);
0 commit comments