Implemented a simple non-blocking queue.