Martin Nilsson (Coppermist) @ Pike (-) developers forum wrote:
And speaking of Concurrent, since MutexKey is destructed immediately when it goes out of scope, I think many of the key=0 can be removed from the code.
Is that new in 8.0 or 8.1? In 7.8, it could take an undetermined amount of time before it would be released if not assigned to zero explicitly before the end of the function.
I have very bad experiences with MutexKeys being held for way too long and causing deadlocks (and I have a *lot* of experience on deadlocks in the pgsql driver).
Immediate destruct was added 1998. That doesn't mean it is bug free, but for such trivial use case as here I would be surprised if it was not, since it is used a lot in Roxen Webserver.