zeroshade commented on code in PR #40807:
URL: https://github.com/apache/arrow/pull/40807#discussion_r1541325263


##########
cpp/src/arrow/record_batch.h:
##########
@@ -254,6 +255,16 @@ class ARROW_EXPORT RecordBatch {
   /// \return Status
   virtual Status ValidateFull() const;
 
+  /// \brief Return a top-level sync event object for this record batch
+  ///
+  /// If all of the data for this record batch is in host memory, then this
+  /// should return null (the default impl). If the data for this batch is
+  /// on a device, then if synchronization is needed before accessing the
+  /// data the returned sync event will allow for it.
+  ///
+  /// \return null or a Device::SyncEvent
+  virtual std::shared_ptr<Device::SyncEvent> GetSyncEvent();

Review Comment:
   technically, the `SyncEvent` is held at the buffer levels currently (and 
should be the same pointer for each relevant buffer). A record batch which can 
return the sync event should be somehow tied to all of its columns (ideally the 
same event for all the columns)



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