Commit Graph
9 Commits
Author SHA1 Message Date
Eric Erhardt 8b6d5baf20 Change .csproj to new Configurations property
Change .sln to use the managed C# project system GUID.


Commit migrated from https://github.com/dotnet/corefx/commit/e05508a62d28f4807f85abe9cb7adf8382f792b4
2018-06-28 17:49:22 -05:00
wtgodbe f38ceb30be Convert all .csproj files in src to SDK-style projects
Commit migrated from https://github.com/dotnet/corefx/commit/91d7e62bbf28094a2b419b87847bcd6a7658564d
2018-05-21 11:53:46 -07:00
Eric St. John 98c0015605 Update SLNs and projects to be in sync with configurations
Commit migrated from https://github.com/dotnet/corefx/commit/8ce7e620e1b5001be002598f4d10d4becdd77a49
2018-03-08 08:25:31 -08:00
Stephen Toub 7482b6a4b0 Expose and roll out ValueTask extensibility
This commit does several things:
- Exposes the new `ValueTask` extensibility model being added in coreclr.  The ValueTask-related files will separately be mirrored over to corefx to enable the netstandard build of System.Threading.Tasks.Extensions.
- Adapts all `Stream`-derived types to return `ValueTask` instead of `Task` from `WriteAsync`.
- Changes the new `WebSocket` `SendAsync` method to return `ValueTask` instead of `Task`, and updates the `ManagedWebSocket` implementation accordingly.  Most `SendAsync`s on `ManagedWebSocket` should now return a `ValueTask` that's either completed synchronously (no allocation) or using a pooled object.  It now uses the underlying transport's new `WriteAsync` overload that returns `ValueTask`.
- Switches more uses of `ReadAsync` and `WriteAsync` over to the new overloads, including in Process, DeflateStream, BrotliStream, File, HttpClient, SslStream, WebClient, BufferedStream, CryptoStream,
- Removed some unnecessary array clearing from various routines using ArrayPool (after the clearing was added we changed our minds and decided clearing was only necessary in very specific circumstances)
- Implements a custom `IValueTaskSource` in Socket, such that async receives and sends become allocation-free (ammortized).  `NetworkStream` then inherits this functionality, such that its new `ReadAsync` and `WriteAsync` are also allocation-free (in the unbounded channel implementations; we can subsequently add it in for bounded).
- Implements a custom `IValueTaskSource` in System.Threading.Channels, such that reading and writing are ammortized allocation-free up to one concurrent reader and writer.
- A few random things I noticed as I was going through, e.g. missing ConfigureAwait, some incorrect synchronization in tests, etc.
- Adds a ton of new tests, mainly in System.Threading.Tasks.Extensions, System.Threading.Channels, and System.Net.Sockets.


Commit migrated from https://github.com/dotnet/corefx/commit/6d1671b2cfcf130b7bc6c059bb0508073426532a
2018-03-02 09:56:25 -08:00
Tarek Mahmoud Sayed 68e558d26e Remove Unbuffer Channel (dotnet/corefx#26689)
Commit migrated from https://github.com/dotnet/corefx/commit/1f8e408e7f2b0681056d1cac55b3ccc5586e8995
2018-01-30 18:09:58 -05:00
Dan Moseley f05c4f6393 Add NS1.3 support to Channels (dotnet/corefx#25697)
* Add NS1.3 support to Channels

* Unify configs

* Add more supported fx

* Fix supported fx

* Add uap

* Remove redundant TFM


Commit migrated from https://github.com/dotnet/corefx/commit/cc8b1f50b288d25170d8e8cc65294d0f18591776
2017-12-13 13:29:25 -08:00
Stephen Toub 566b3dd2e6 Add back ChannelReader.ReadAsync
In the API review, we'd said to remove ReadAsync if we could, as we didn't like that it encouraged exceptions as control flow, due to exceptions getting thrown when attempting to read from a completed channel.

However, removing it is problematic for a few reasons:
- While for most channels its behavior can be achieved external to the channels on top of TryRead and WaitToReadAsync, that's not the case for UnbufferedChannel.  UnbufferedChannel.ReadAsync provides unique functionality that can only be achieved from within the implementation, as reads need to exist concurrently with writes in order for them to pair up.
- Channels in go don't have the notion of completion, which means the ReadAsync equivalent is very common there.  Any code written in that style and trying to port to this will expect a similar function but will instead be forced to emulate it with WaitToReadAsync/TryRead.

As such, I'm putting it back as a base virtual method and an override just on UnbufferedChannel's implementation.


Commit migrated from https://github.com/dotnet/corefx/commit/3c73f4621fe891aa25e97be2bbf772d7a747d263
2017-11-02 23:54:17 -04:00
Stephen Toub 302a648a7d Address System.Threading.Channels PR feedback (dotnet/corefx#24955)
Addressing a few pieces of feedback on the previous PR, plus some auto-cleanup.

Commit migrated from https://github.com/dotnet/corefx/commit/9a90c2e1fcfb3276275a39f6cdc383e8a3012df0
2017-10-30 15:02:02 -04:00
Stephen Toub e424fbb097 Add System.Threading.Channels to corefx
Bring the source over from corefxlab, add a package, get everything building, etc.


Commit migrated from https://github.com/dotnet/corefx/commit/c8ec3a850bd05aa8d8a6067071b723366b5648a3
2017-10-25 19:45:02 -04:00