osvenskan / posix_ipc

Other
137 stars 25 forks source link

Does posix_ipc's message queue thread safe & process safe? #52

Closed sukwoo1414 closed 11 months ago

sukwoo1414 commented 1 year ago

For example, In the case that I create a single MessageQueue() instance and multiple processes(by multiprocessing module) share that instance, does multiple processes calling MessageQueue.send() at the same time cause race condition? I know that posix message queue itself is thread safe, but I'm not sure this wrapper of python is also safe.

osvenskan commented 1 year ago

Yes, it's thread safe and process safe.