in reply to Shared memory with IPC::Shareable
What version are you using? At least in 0.60, any locks are released in an END block if you forget to (assuming your program exits normally). However, if you have an older version, this might be explained by a performance optimization that IPC::Shareable uses. When you have a write lock on a segment, the changes you make are not immediately written to the shared memory segment. Rather, they are deferred until the unlock happens, to avoid freezing and thawing repeatedly. So, you can see how it might appear that you are updating the shared object, but if you don't unlock other processes will never see it.
|