Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

[corlib] Import System.IO.Stream/BufferedStream from CoreFX #26

Merged
merged 1 commit into from
Nov 7, 2018

Conversation

alexischr
Copy link

Merge with mono/mono#10880

@@ -647,8 +647,11 @@ void ITaskCompletionAction.Invoke(Task completingTask)

var invokeAsyncCallback = s_invokeAsyncCallback;
if (invokeAsyncCallback == null) s_invokeAsyncCallback = invokeAsyncCallback = InvokeAsyncCallback; // benign race condition

#if MONO // Mono uses ExecutionContext from referencesource
Copy link
Member

Choose a reason for hiding this comment

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

Could we make this change on our side (add a new overload)

Copy link
Member

@marek-safar marek-safar left a comment

Choose a reason for hiding this comment

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

Add the overload

@alexischr alexischr force-pushed the corefx-System.IO.Stream branch 2 times, most recently from 8a5f635 to 7641bb7 Compare October 23, 2018 20:52
@alexischr alexischr force-pushed the corefx-System.IO.Stream branch 3 times, most recently from 6503a67 to d87dd62 Compare October 24, 2018 08:27
@@ -387,9 +397,27 @@ async ValueTask<int> FinishReadAsync(Task<int> readTask, byte[] localBuffer, Mem
ArrayPool<byte>.Shared.Return(localBuffer);
}
}
#else
return new ValueTask<int> (FinishReadAsync(ReadAsync(sharedBuffer, 0, buffer.Length, cancellationToken), sharedBuffer, buffer));
Copy link
Member

@marek-safar marek-safar Oct 25, 2018

Choose a reason for hiding this comment

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

This should be just

Suggested change
return new ValueTask<int> (FinishReadAsync(ReadAsync(sharedBuffer, 0, buffer.Length, cancellationToken), sharedBuffer, buffer));
return FinishReadAsync(ReadAsync(sharedBuffer, 0, buffer.Length, cancellationToken), sharedBuffer, buffer);

@akoeplinger akoeplinger merged commit 0e5f123 into master Nov 7, 2018
@akoeplinger akoeplinger deleted the corefx-System.IO.Stream branch November 7, 2018 12:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants