Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkg/Microsoft.Private.PackageBaseline/packageIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -2601,7 +2601,8 @@
"4.7.1",
"4.7.2",
"4.7.3",
"4.7.4"
"4.7.4",
"4.7.5"
],
"BaselineVersion": "4.7.0",
"InboxOn": {},
Expand All @@ -2612,7 +2613,8 @@
"4.0.2.0": "4.7.0",
"4.0.2.1": "4.7.1",
"4.0.2.2": "4.7.3",
"4.0.2.3": "4.7.4"
"4.0.2.3": "4.7.4",
"4.0.2.4": "4.7.5"
}
},
"System.IO.Pipes": {
Expand Down
4 changes: 2 additions & 2 deletions src/System.IO.Pipelines/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<AssemblyVersion>4.0.2.3</AssemblyVersion>
<PackageVersion>4.7.4</PackageVersion>
<AssemblyVersion>4.0.2.4</AssemblyVersion>
<PackageVersion>4.7.5</PackageVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ private void WriteMultiSegment(ReadOnlySpan<byte> source)
}

// We filled the segment
_writingHead.End += writable;
_writingHead.End += _writingHeadBytesBuffered;
_writingHeadBytesBuffered = 0;

// This is optimized to use pooled memory. That's why we pass 0 instead of
Expand Down
14 changes: 14 additions & 0 deletions src/System.IO.Pipelines/tests/PipeLengthTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,19 @@ public async Task NullExaminedAndConsumedNoops()
ReadResult result = await _pipe.Reader.ReadAsync();
_pipe.Reader.AdvanceTo(default, default);
}

[Fact]
public async Task AdvanceFollowedByWriteAsyncTest()
{
Memory<byte> buffer = new byte[26];
Pipe pipe = new Pipe(new PipeOptions(minimumSegmentSize: 1));

var mem = pipe.Writer.GetMemory(14).Slice(0, 14);
buffer.Slice(0, 14).CopyTo(mem);
pipe.Writer.Advance(14);
await pipe.Writer.WriteAsync(buffer.Slice(14));
ReadResult res = await pipe.Reader.ReadAsync();
Assert.Equal(res.Buffer.Length, buffer.Length);
}
}
}
3 changes: 3 additions & 0 deletions src/packages.builds
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<AdditionalProperties>$(AdditionalProperties)</AdditionalProperties>
</Project>
<!-- add specific builds / pkgproj's here to include in servicing builds -->
<Project Include="$(MSBuildThisFileDirectory)System.IO.Pipelines\pkg\System.IO.Pipelines.pkgproj">
<AdditionalProperties>$(AdditionalProperties)</AdditionalProperties>
</Project>
</ItemGroup>

<ItemGroup>
Expand Down