tustvold opened a new issue, #2201:
URL: https://github.com/apache/arrow-datafusion/issues/2201

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   Currently a number of `ExecutionPlan` operators call `tokio::spawn`, 
`tokio::spawn_blocking`, etc... and will therefore panic if used outside of a 
tokio runtime. This prevents an incremental migration towards an alternative 
scheduler (#2199)
   
   **Describe the solution you'd like**
   
   Operators should use 
[`Handle::try_current`](https://docs.rs/tokio/latest/tokio/runtime/struct.Handle.html#method.try_current)
 to determine if running within a tokio context and adjust their behaviour 
accordingly.
   
   **Describe alternatives you've considered**
   
   The new scheduler could use 
[`Runtime::enter`](https://docs.rs/tokio/latest/tokio/runtime/struct.Runtime.html#method.enter)
 in order to allow the usage of tokio on its worker threads. However, whilst 
this would work, it would result in work being offloaded from the scheduler's 
thread pool to the tokio thread pool, which we do not want.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to