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)

Reply via email to