DDtKey commented on PR #9318:
URL: 
https://github.com/apache/arrow-datafusion/pull/9318#issuecomment-1962176561

   I found current interface less boilerplaite actually, but anyway - it's not 
a main point. Safety is more important.
   
   `AbortOnDrop` didn't provide the same guarantees, we even may see 
`JoinHandles` were sent through channels and only then wrapped in this 
interface.  But we can cancel the execution even before receiver part is 
awaited. 
   Or just a lot of tasks spawned in a loop with await points in between and 
only then wrapped into `AbortOnDropMany`, so you probably never will reach the 
point they are wrapped.
   
   There is no strict rules how to spawn tasks and how to work with them in the 
current codebase. And I personally encountered cancellation issues several 
times with datafusion.
   
    So I just believe we need to have a safe way to work with this and 
intuitive 
    
    Just use `SpawnedTask::spawn` instead of `tokio::spawn` and we won't have 
at least obvious issues. Also compiler will prevent such code for us.
    
   And as far as I can see it was raised even before: #6513


-- 
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