Nimble Robotics Interview Question

Implement an asynchronous channel that can be used for communication between threads such that all the data sent will become available for receiving in the same order. send should not block the thread it was called. Receive will block until the sent message is available and the block should not waste CPU time on busy/spin wait

Interview Answer

Anonymous

Jun 1, 2024

You can use locks and a queue or use semaphores with acquire and release.