-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider providing posix mutex? #53
Comments
Hi @madjxatw, thanks for the suggestion. I don't have plans to provide the provide any interface to the posix mutex from the threads library. The idea of putting a threading mutex in IPC shared memory is interesting. Is that a technique that's used in some C programs? |
@osvenskan Yes. We could even put unnamed semaphores in the shared memory for inter-process synchronization. However, the posix semaphore does not has a feature that is equivalent to |
Thanks for the context. My memories are hazy, but I seem to recall that You're aware of my SysV IPC module for Python, yes? (https://github.com/osvenskan/sysv_ipc) I appreciate the suggestion, and I'll certainly take it under consideration. FYI, I don't have the time right now to tackle a feature of this size, and I don't know when I might get that time. It doesn't look tremendously complicated, but it would increase the size of the module (code, unit tests, documentation, etc.) by about one third, and I'd have to exercise the new code on Mac, Linux, and BSD to look for platform-specific quirks. That's harder for me than it used to be since I can no longer use Virtualbox to run Linux and BSD on my M-series Mac. I'm sorry if this is discouraging, but I'm trying to set realistic expectations both for you and for myself. 🙂 |
Will this package provide posix mutex? In the cases where mutex fits, putting posix robust shared mutex in shared memory might be preferable for inter-process synchronization over named semaphore because posix semaphore does not release itself when the process holding it terminates unexpectedly, which might block other waiting processes indefinitely.
The text was updated successfully, but these errors were encountered: