Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup memcached protocol #102

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

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.

}

public MemcachedRequest(Opcode opcode, byte[] key, uint opaque)
{
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

@@ -40,6 +43,8 @@ public MemcachedProtocol(ConnectionContext connection)

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