mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-12-24 01:25:48 +08:00
优化 IFreeSql.Transaction 可嵌套连续使用,之前会死锁
This commit is contained in:
@@ -48,6 +48,8 @@ namespace FreeSql.Internal.CommonProvider {
|
||||
public void TransactionPreRemoveCache(params string[] key) => PreRemove(key);
|
||||
|
||||
public void BeginTransaction(TimeSpan timeout) {
|
||||
if (TransactionCurrentThread != null) return;
|
||||
|
||||
int tid = Thread.CurrentThread.ManagedThreadId;
|
||||
Transaction2 tran = null;
|
||||
Object<DbConnection> conn = null;
|
||||
|
||||
Reference in New Issue
Block a user