mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-11 15:54:59 +03:00
Code optimization, function asynchrony
This commit is contained in:
@@ -14,9 +14,14 @@ namespace ServiceLib.Handler
|
||||
|
||||
public ProfileExHandler()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
private async Task Init()
|
||||
{
|
||||
await InitData();
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Init();
|
||||
while (true)
|
||||
{
|
||||
await SaveQueueIndexIds();
|
||||
@@ -25,7 +30,7 @@ namespace ServiceLib.Handler
|
||||
});
|
||||
}
|
||||
|
||||
private async Task Init()
|
||||
private async Task InitData()
|
||||
{
|
||||
await SQLiteHelper.Instance.ExecuteAsync($"delete from ProfileExItem where indexId not in ( select indexId from ProfileItem )");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user