Handle concurrent dispose and WriteAsync calls (dotnet/corefx#36988)
authorDavid Fowler <davidfowl@gmail.com>
Thu, 18 Apr 2019 17:32:55 +0000 (10:32 -0700)
committerGitHub <noreply@github.com>
Thu, 18 Apr 2019 17:32:55 +0000 (10:32 -0700)
commitf52ca122726d697dccd46af2e2d8eab13703d306
treedb6b1ed47cd287f7cc2308235fcc3b74f3c027e9
parentc1a33264074aa5a9c8db9cee4d64f8559f88239d
Handle concurrent dispose and WriteAsync calls (dotnet/corefx#36988)

- lock the entire Write operation
- Added a test that Completes both reader and writer in the middle of writing a large buffer

Commit migrated from https://github.com/dotnet/corefx/commit/90d98b9abb87743c2340506a7823e452c757767c
src/libraries/System.IO.Pipelines/src/Resources/Strings.resx
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
src/libraries/System.IO.Pipelines/tests/PipeWriterTests.cs