Weston Pace created ARROW-12091:
-----------------------------------

             Summary: [C++] Allow AddCallback/Then to take in an optional 
Executor.
                 Key: ARROW-12091
                 URL: https://issues.apache.org/jira/browse/ARROW-12091
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Weston Pace


Right now `Executor::Transfer` isn't perfectly reliable since callbacks added 
after the future has been completed will be run synchronously and so the thread 
task would be spawned at the wrong time.  With this feature 
`Executor::Transfer` could be fixed.

This would need to be added to both `Then` and `AddCallback`.

Ideally the methods would detect if the current thread is already on the 
desired executor and do nothing in that situation.  Spinning up unnecessary 
thread tasks would do more harm than good.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to