2016-01-17 17:47 GMT+01:00 Ben Coman <btc@openinworld.com>:
I suspect a problem since it does not check it is the owningProcess
before setting owningProcess to nil.  AFAIK, only the owning process
should be able to release the mutex.

Yes. But it is not mutex. It is more abstract thing which allow implement mutex and other concurrency stuff (like ReadWriteLock). That's why I rename CriticalSection to LockOwnership in my proposals. It only contains primitives and no high level methods like #critical:.