Fast path Consume when already complete#521
Conversation
There was a problem hiding this comment.
I don't understand this. Why not put his call to ReadAsyncImplementation inside of ConsumeAwaited? You already do this inside the while condition.
There was a problem hiding this comment.
Yeah is a bit weird; enough to make me look at it for a good few minutes before working out why.
Is because the non-completed one passes in the current task so is to match that. Will have a think on how it can be made better.
There was a problem hiding this comment.
Swapped the parameters; and made the task have a null default. Better?
|
Will have to be updated post ValueTask merge, but aside from my one comment this is good to 🚢 |
f200305 to
271d66f
Compare
|
This is a a bit fiddly with the ValueTask; merge to rebase, will take a little bit of time. |
|
Closing this; I think I'd need to start again; too much code has changed in the merge. Likely to make mistakes. |
271d66f to
e533d5d
Compare
|
Rebased and reworked to work with the ValueTask changes |
|
|
Fast path
Consumewhen content complete by not using async state machine (is normally complete)From #519