zanmato1984 commented on issue #40069:
URL: https://github.com/apache/arrow/issues/40069#issuecomment-1964121391

   > > However, the interpretation of the scratch space is type-dependent, 
i.e., some types treat it as two 32-byte space and others treat it as two 
64-byte space.
   > 
   > But all threads accessing the scratch space should interpret it as the 
same type, right?
   > 
   
   Right. The question here is that the scratch space is defined in a generic 
place, i.e., `ArraySpanFillFromScalarScratchSpace` (base class of all 
"scratched" scalars) and we couldn't know how it is going to be interpreted at 
runtime, despite whether all threads interpret it as the same type or not.
   
   > > extra atomic flags + spinning (keeping scratch space itself unchanged - 
as plane memory)
   > 
   > Please let's avoid home-grown synchronization like this. Either we can use 
atomic accesses without spinning, or we should use a lock.
   
   Yeah, of course. I was thinking about using mutex too.


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