westonpace commented on a change in pull request #10632:
URL: https://github.com/apache/arrow/pull/10632#discussion_r661709398



##########
File path: cpp/src/arrow/util/async_generator.h
##########
@@ -1338,11 +1342,34 @@ class BackgroundGenerator {
       return next;
     }
 
+#if (defined(__GNUC__) || defined(__clang__))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
+#endif
+
+    void SetWorkerThreadId(const std::thread::id tid) {

Review comment:
       True, but the assert catches an otherwise potentially subtle issue in 
how BackgroundGenerator is meant to be used.  It's not entirely obvious that 
you aren't allowed to dispose of it from the worker thread and it a fair amount 
of debugging to discover this root cause.
   
   What was the issue?  Is it because the worker thread id might be changing 
(from set to unset) when the assert in cleanup happens?




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