You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Eric Erhardt (JIRA)" <ji...@apache.org> on 2019/02/28 18:30:00 UTC
[jira] [Created] (ARROW-4717) [C#] Consider exposing ValueTask
instead of Task
Eric Erhardt created ARROW-4717:
-----------------------------------
Summary: [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
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)