I have some hub methods that perform I / O operations that I want to call asynchronously.
Is it possible to use a ConfigureAwait(false)hub in my methods or for SignalR I need a captured SynchronizationContext for request information or something like that?
public async Task<Response> Save() {
var response = await SaveThingsAsync().ConfigureAwait(false);
return response;
}
To clarify: my code does not require a thread culture or anything else stored in a SynchronizationContext.
I am concerned that the SignalR server code might store there information, such as client identifiers, request information or the like, that might not be available if the asynchronous operation method continues from another thread.
When I tested my method, it worked fine, but that doesn't prove anything.
source
share