jorisvandenbossche commented on issue #34031:
URL: https://github.com/apache/arrow/issues/34031#issuecomment-1544103104

   > > * The consumer renames the capsule (which gives some protection to the C 
Data pointer being consumed more than once)
   > 
   > This doesn't seem necessary in our case, as the consumer would typically 
move the C struct contents.
   
   But can a consumer move the C struct content multiple times (and potentially 
calling the release callback multiple times?)
   
   The other reason for renaming in the case of DLPack is that it checks for 
this in the capsule deleter, to only call the release callback of the struct in 
case it was not consumed/renamed (for example [cupy's 
implementation](https://github.com/cupy/cupy/blob/cb71365934dd5fa8197578ba55b74370cf07951a/cupy/_core/dlpack.pyx#L79-L85)).
 But that's in the end the same question I assume, because it also depends on 
whether it is OK to call the release callback multiple times.


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