Le 06/04/2020 à 19:22, Todd Lipcon a écrit :
> 
> The spec should also probably cover thread-safety: if the consumer gets an
> ArrowArray, is it safe to pass off the children to multiple threads and
> have them call release() concurrently? In other words, do I need to use a
> thread-safe reference count? I would guess so.

Hmm, the spec may not be clear enough on this, but if you move a child
and release the parent, then the other children are not usable anymore.

In your case, you don't call release() on every child.  You just call
release() on the parent once you are done with all children.  So the
synchronization has to be managed on the consumer side, the producer
doesn't see any of it.
(and of course, the simplest way to do that in C++ may be to use a
shared_ptr to an object holding the ArrowArray struct)

Regards

Antoine.

Reply via email to