Commit b7e6b3e8 authored by 潘栩锋's avatar 潘栩锋 🚴

优化 不同的数据库,使用不同的 task 线程

parent 109e7b16
......@@ -541,8 +541,9 @@ namespace SQLite
new Task((obj) => {
var _sqls = obj as IEnumerable<string>;
QueryTran(_sqls);
}, queryList).Start(StepByStepTaskScheduler.Current);
}, queryList).Start(Scheduler);
}
TaskScheduler Scheduler { get; } = new StepByStepTaskScheduler();
List<string> holdQueryList = new List<string>();
bool isHoldQueryTran = false;
......@@ -945,7 +946,7 @@ namespace SQLite
public static StepByStepTaskScheduler Instance { get; } = (StepByStepTaskScheduler)Current;
private readonly BlockingCollection<Task> m_queue = new BlockingCollection<Task>();
StepByStepTaskScheduler()
public StepByStepTaskScheduler()
{
//Thread thread = new Thread(Run);
//thread.IsBackground = true;//设为为后台线程,当主线程结束时线程自动结束
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment