This Article IsCreated at 2023-11-29Last Modified at 2023-11-29Referenced as ia.www.f12

POSIX Message Queue Sucks

mq_open sucks on Linux. By the POSIX standard, it probably sucks everywhere.

To create an anonymous message queue, you have to do mq_open(name, O_CREAT|O_EXCL|O_RDWR, _, _) followed by mq_unlink(name). The operation (2 syscalls) is atomic, but

I guess I’ll stick to futex-based message queue implementations. Notable mentions are Zig’s std queue and libzmq.

Better yet, I will not write threaded programs if I don’t have to.