Commits


Antoine Pitrou authored and GitHub committed c4d17fdbf37
GH-44846: [C++] Fix thread-unsafe access in ConcurrentQueue::UnsyncFront (#44849) ### Rationale for this change The `UnsyncFront` method claims that it can access a `std::deque`'s front element without synchronizing with another thread that would call `std::deque::push_back`, but `std::deque::front` can actually be implemented in terms of `std::deque::begin` while `std::deque::push_back` is specified to invalidate iterators. In the end, `UnsyncFront` is concretely thread-unsafe even though it might ideally be thread-safe. This shows up as occasional Thread Sanitizer failures. ### What changes are included in this PR? Replace `UnsyncFront` with a thread-safe `Front` method. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #44846 Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>