You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewInvalidOperationException($"Two concurrent threads have been detected accessing the same ISession instance from: \n{Environment.StackTrace}\nand:\n{_previousStackTrace}\n---");
892
+
}
893
+
894
+
_previousStackTrace=Environment.StackTrace;
895
+
}
896
+
897
+
publicvoidExitAsyncExecution()
898
+
{
899
+
if(!_enableThreadSafetyChecks)
900
+
{
901
+
return;
902
+
}
903
+
904
+
Interlocked.Decrement(ref_asyncOperations);
905
+
}
906
+
859
907
publicasyncTaskSaveChangesAsync()
860
908
{
909
+
EnterAsyncExecution();
910
+
861
911
try
862
912
{
863
913
if(!_cancel)
864
914
{
865
-
awaitFlushAsync();
915
+
awaitFlushInternalAsync(true);
866
916
867
917
_save=true;
868
918
}
869
919
}
870
920
finally
871
921
{
872
922
awaitCommitOrRollbackTransactionAsync();
923
+
ExitAsyncExecution();
873
924
}
874
925
}
875
926
@@ -1362,11 +1413,20 @@ public async Task<DbTransaction> BeginTransactionAsync(IsolationLevel isolationL
0 commit comments