Implement a channel (like the Golang primitive) that can be used for communicating between threads, such that all data sent will become available for receiving in the same order.
This channel is unbounded, so send should not block the calling thread indefinitely.
receive will block if no message is available in the channel until a new message is made available from a different thread.
The blocking wait should not waste CPU time on busy/spin wait.
This problem asks for an unbounded, thread-safe channel similar to Go's channel: messages must be received in FIFO order, send should not block indefinitely due to capacity limits, and receive must block efficiently when the channel is empty without busy spinning. A typical solution uses a concurrent queue plus a mutex and condition variable or semaphore to coordinate producers and consumers while preserving ordering and correct wakeups.