davidfowl / BedrockFramework

High performance, low level networking APIs for building custom servers and clients.
MIT License
1.04k stars 152 forks source link

Cleanup memcached protocol #102

Open matthewDDennis opened 4 years ago

matthewDDennis commented 4 years ago

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.