Write a thread-safe data buffer in C++ that can handle high-frequency sensor inputs at Autonomous Solutions.