You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (JIRA)" <ji...@apache.org> on 2015/10/26 14:48:27 UTC

[jira] [Created] (IGNITE-1791) .Net: Improve Task-based async API efficiency with promise-style tasks

Pavel  Tupitsyn created IGNITE-1791:
---------------------------------------

             Summary: .Net: Improve Task-based async API efficiency with promise-style tasks
                 Key: IGNITE-1791
                 URL: https://issues.apache.org/jira/browse/IGNITE-1791
             Project: Ignite
          Issue Type: Improvement
          Components: interop
    Affects Versions: 1.5
            Reporter: Pavel  Tupitsyn
            Assignee: Pavel  Tupitsyn
             Fix For: 1.5


Currently we use TaskFactory.FromAsync to create tasks and return them from API. This requires implementing IAsyncResult, which has a heavyweight WaitHandle inside. TaskFactory then uses ThreadPool.RegisterWaitForSingleObject to wait on that handle and set task completion. 

Creating WaitHandle and waiting on it are redundant extra steps.
System.Threading.Task has internal API to create "promise-style" task and then set it to completed state when needed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)