Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Break read+write dependency in Stream copy op #557

Closed
wants to merge 1 commit into from

Conversation

benaadams
Copy link
Contributor

No description provided.


while (true)
private static async Task ArrayPoolCopyToAsyncInternal(Stream source, Stream destination, byte[] buffer0, byte[] buffer1, long? length, CancellationToken cancellationToken)
Copy link
Member

Choose a reason for hiding this comment

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

Internal is redundant with private

@davidfowl
Copy link
Member

After reading @stephentoub's comment on the corefx PR I'm not so sure this is a good idea.

if (bytesRemaining.HasValue)
while ((count = await lastReadTask) != 0)
{
if (count == 0)
Copy link
Member

Choose a reason for hiding this comment

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

Didn't you just check this on line 58?

@Tratcher
Copy link
Member

Tratcher commented Feb 8, 2016

It probably works but it's hard to follow.

@benaadams
Copy link
Contributor Author

Comment @davidfowl is referring to dotnet/corefx#5954 (comment)

@benaadams
Copy link
Contributor Author

Worth making changes, or close 👍 👎 ?

@benaadams
Copy link
Contributor Author

meh

@benaadams benaadams closed this Feb 11, 2016
@benaadams benaadams deleted the read-write-dep branch May 10, 2016 11:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants