paleolimbot commented on code in PR #550:
URL: https://github.com/apache/arrow-nanoarrow/pull/550#discussion_r1693214664


##########
python/src/nanoarrow/_array.pyx:
##########
@@ -107,7 +106,7 @@ cdef class CArrayView:
     def __cinit__(self, object base, uintptr_t addr):
         self._base = base
         self._ptr = <ArrowArrayView*>addr
-        self._device = DEVICE_CPU
+        self._event = CSharedSyncEvent(DEVICE_CPU)

Review Comment:
   We still have the device here (it's one of the two things stored by the 
shared sync event), but we definitely need the ability to synchronize before 
buffer access. The other option would be to synchronize before constructing the 
array view but I gather that synchronizing is expensive (hence trying to avoid 
here).
   
   > Should we make event an option param in the init here?
   
   The constructors for all the classes are still a bit of a mess...pyarrow has 
a better system for this (e.g., most constructors have zero parameters and/or 
error, and internal constructors + static methods are used to construct).



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