40 writes to ThreadHasParserLockForClose
System.Data (40)
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (14)
1191internalConnection.ThreadHasParserLockForClose = true; 1196internalConnection.ThreadHasParserLockForClose = false; 1205internalConnection.ThreadHasParserLockForClose = true; 1210internalConnection.ThreadHasParserLockForClose = false; 1217internalConnection.ThreadHasParserLockForClose = true; // In case of error, let the connection know that we have the lock 1224internalConnection.ThreadHasParserLockForClose = false; 1233internalConnection.ThreadHasParserLockForClose = true; // In case of error, let the connection know that we have the lock 1238internalConnection.ThreadHasParserLockForClose = false; 2237internalConnection.ThreadHasParserLockForClose = true; // In case of error, tell the connection we already have the parser lock 2242internalConnection.ThreadHasParserLockForClose = false; 2432_parser.Connection.ThreadHasParserLockForClose = true; 2447_parser.Connection.ThreadHasParserLockForClose = false; 2623internalConnection.ThreadHasParserLockForClose = true; // In case of error, let the connection know that we already have the parser lock 2631internalConnection.ThreadHasParserLockForClose = false;
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (10)
399ThreadHasParserLockForClose = true; // In case of error, let ourselves know that we already own the parser lock 459ThreadHasParserLockForClose = false; 1089ThreadHasParserLockForClose = true; // In case of error, let the connection know that we already own the parser lock 1121ThreadHasParserLockForClose = false; 1171ThreadHasParserLockForClose = false; 2007ThreadHasParserLockForClose = true; 2015ThreadHasParserLockForClose = false; 2030ThreadHasParserLockForClose = true; // In case of error, let the connection know that we already own the parser lock 2043ThreadHasParserLockForClose = false; 2074ThreadHasParserLockForClose = false;
fx\src\data\System\Data\SqlClient\TdsParser.cs (8)
1298connHandler.ThreadHasParserLockForClose = true; 1303connHandler.ThreadHasParserLockForClose = false; 1315_connHandler.ThreadHasParserLockForClose = true; 1323_connHandler.ThreadHasParserLockForClose = threadAlreadyHadParserLockForClose; 7722_connHandler.ThreadHasParserLockForClose = true; 7888_connHandler.ThreadHasParserLockForClose = false; 7916_connHandler.ThreadHasParserLockForClose = true; 7925_connHandler.ThreadHasParserLockForClose = originalThreadHasParserLock;
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (8)
595_parser.Connection.ThreadHasParserLockForClose = true; 602_parser.Connection.ThreadHasParserLockForClose = false; 2871_parser.Connection.ThreadHasParserLockForClose = true; // In case of error, let the connection know that we are holding the lock 2881_parser.Connection.ThreadHasParserLockForClose = false; 3030_parser.Connection.ThreadHasParserLockForClose = true; 3045_parser.Connection.ThreadHasParserLockForClose = false; 3081_parser.Connection.ThreadHasParserLockForClose = true; 3091_parser.Connection.ThreadHasParserLockForClose = false;
14 references to ThreadHasParserLockForClose
System.Data (14)
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (5)
1086Debug.Assert(!ThreadHasParserLockForClose || _parserLock.ThreadMayHaveLock(), "Thread claims to have parser lock, but lock is not taken"); 1087if (!ThreadHasParserLockForClose) { 2003bool obtainParserLock = !ThreadHasParserLockForClose; 2024Debug.Assert(!ThreadHasParserLockForClose, "Cannot call this method if caller has parser lock"); 2025if (ThreadHasParserLockForClose) {
fx\src\data\System\Data\SqlClient\TdsParser.cs (7)
1313bool threadAlreadyHadParserLockForClose = _connHandler.ThreadHasParserLockForClose; 7718Debug.Assert(!_connHandler.ThreadHasParserLockForClose || _connHandler._parserLock.ThreadMayHaveLock(), "Thread claims to have parser lock, but lock is not taken"); 7719bool callerHasConnectionLock = _connHandler.ThreadHasParserLockForClose; // If the thread already claims to have the parser lock, then we will let the caller handle releasing it 7912bool originalThreadHasParserLock = _connHandler.ThreadHasParserLockForClose; 7952bool needToTakeParserLock = (!callerHasConnectionLock) && (!_connHandler.ThreadHasParserLockForClose); 7953Debug.Assert(!_connHandler.ThreadHasParserLockForClose || sync, "Thread shouldn't claim to have the parser lock if we are doing async writes"); // Since we have the possibility of pending with async writes, make sure the thread doesn't claim to already have the lock 8052Debug.Assert(!firstCall || !_connHandler.ThreadHasParserLockForClose, "Thread should not already have connection lock");
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (2)
601if (_parser.Connection.ThreadHasParserLockForClose) { 3027if ((mustTakeWriteLock) && (!_parser.Connection.ThreadHasParserLockForClose)) {