[
https://issues.apache.org/jira/browse/ARROW-4717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16830341#comment-16830341
]
Eric Erhardt commented on ARROW-4717:
-------------------------------------
[~jthelin] - Take a look at the StreamExtensions class/files under
[https://github.com/apache/arrow/tree/master/csharp/src/Apache.Arrow/Extensions].
These polyfills/shims allow for the Arrow code to work on netstandard1.3, and
if the memory is backed by a .NET array, there are no extra allocations/copies.
(However, in the case where the memory is backed by something else, and it is
not running on .NET Core 2.1 or higher, then it does need to copy the data into
an array in order to continue working.)
> How important is it to maintain compatibility with .NET Standard 1.3?
I would say it is fairly important to at least work on netstandard2.0. The
main project I am using the C# Arrow library is in the .NET for Apache Spark
project [https://github.com/dotnet/spark], which currently targets
netstandard2.0 and is supported on .NET Framework v4.6.1.
> [C#] Consider exposing ValueTask instead of Task
> ------------------------------------------------
>
> Key: ARROW-4717
> URL: https://issues.apache.org/jira/browse/ARROW-4717
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C#
> Reporter: Eric Erhardt
> Assignee: Eric Erhardt
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h
> Remaining Estimate: 0h
>
> See [https://github.com/apache/arrow/pull/3736#pullrequestreview-207169204]
> for the discussion and
> [https://devblogs.microsoft.com/dotnet/understanding-the-whys-whats-and-whens-of-valuetask/]
> for the reasoning.
> Using `Task<T>` in public API requires that a new Task instance be allocated
> on every call. When returning synchronously, using ValueTask will allow the
> method to not allocate.
> In order to do this, we will need to take a new dependency on
> {{System.Threading.Tasks.Extensions}} NuGet package.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)