Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
Thick-Common
Commits
b7e6b3e8
Commit
b7e6b3e8
authored
May 30, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 不同的数据库,使用不同的 task 线程
parent
109e7b16
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
SQLiteHelper.cs
Project.SQLiteHelper/SQLiteHelper/SQLiteHelper.cs
+3
-2
No files found.
Project.SQLiteHelper/SQLiteHelper/SQLiteHelper.cs
View file @
b7e6b3e8
...
@@ -541,8 +541,9 @@ namespace SQLite
...
@@ -541,8 +541,9 @@ namespace SQLite
new
Task
((
obj
)
=>
{
new
Task
((
obj
)
=>
{
var
_sqls
=
obj
as
IEnumerable
<
string
>;
var
_sqls
=
obj
as
IEnumerable
<
string
>;
QueryTran
(
_sqls
);
QueryTran
(
_sqls
);
},
queryList
).
Start
(
S
tepByStepTaskScheduler
.
Current
);
},
queryList
).
Start
(
S
cheduler
);
}
}
TaskScheduler
Scheduler
{
get
;
}
=
new
StepByStepTaskScheduler
();
List
<
string
>
holdQueryList
=
new
List
<
string
>();
List
<
string
>
holdQueryList
=
new
List
<
string
>();
bool
isHoldQueryTran
=
false
;
bool
isHoldQueryTran
=
false
;
...
@@ -945,7 +946,7 @@ namespace SQLite
...
@@ -945,7 +946,7 @@ namespace SQLite
public
static
StepByStepTaskScheduler
Instance
{
get
;
}
=
(
StepByStepTaskScheduler
)
Current
;
public
static
StepByStepTaskScheduler
Instance
{
get
;
}
=
(
StepByStepTaskScheduler
)
Current
;
private
readonly
BlockingCollection
<
Task
>
m_queue
=
new
BlockingCollection
<
Task
>();
private
readonly
BlockingCollection
<
Task
>
m_queue
=
new
BlockingCollection
<
Task
>();
StepByStepTaskScheduler
()
public
StepByStepTaskScheduler
()
{
{
//Thread thread = new Thread(Run);
//Thread thread = new Thread(Run);
//thread.IsBackground = true;//设为为后台线程,当主线程结束时线程自动结束
//thread.IsBackground = true;//设为为后台线程,当主线程结束时线程自动结束
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment