Skip to content

Conversation

matthewDDennis
Copy link
Contributor

@matthewDDennis matthewDDennis commented Aug 23, 2020

Move the _semaphore.WaitAsync into the CommandWithResult and CommandWithNoResult methods. The calling methods really should not have to know about this implementation detail.
As a bonus, this allows the awaits to be removed from the calling methods and thus one level of async state machine.

{
Opcode = opcode;
Key = key;
Key = key;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Fix the spacing

_memcachedMessageReader = new MemcachedMessageReader();
}

private async Task<byte[]> CommandWithResult(MemcachedRequest request)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ValueTask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants