Consider changing OperationState to be asynchronous

Description

Metadata.WaitForSchemaAgreement(Connection) is using blocking code like Task.WaitAll and doesn't return a Task. It should be async and use non blocking code like await Task.WhenAll.

We should analyse whether it makes sense to change all the callbacks related to requests from Action to Func<Task>. See OperationState, Connection.Send, Metadata.WaitForSchemaAgreement, HandleSchemaChange

Environment

None

Pull Requests

None

Status

Assignee

Unassigned

Reporter

Joao Reis

Labels

None

PM Priority

None

Fix versions

None

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Epic Link

None

Sprint

Size

None

Priority

Major
Configure