public Mutex() { var code = MutexPrimitives.CreateMutex(out this.handle); if (code != ThreadResultCode.Success) { throw new Exception("Mutex creation failed with error code '" + code + "'."); } }