Skip to content

Cleanup memcached protocol#102

Open
matthewDDennis wants to merge 7 commits intodavidfowl:mainfrom
matthewDDennis:Cleanup_MemcachedProtocol
Open

Cleanup memcached protocol#102
matthewDDennis wants to merge 7 commits intodavidfowl:mainfrom
matthewDDennis:Cleanup_MemcachedProtocol

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

@@ -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