A queue for multithreaded message passing