Thread pool

This commit is contained in:
Aurélie Delhaie
2022-06-26 17:00:52 +02:00
parent 346babf3c7
commit 8bf7c85112
15 changed files with 20 additions and 20 deletions

View File

@@ -58,7 +58,7 @@ namespace OpenSaveCloudClient
LockControls(false);
return;
}
new Thread(() =>
ThreadPool.QueueUserWorkItem(delegate
{
serverConnector.ChangePassword(new NewPassword { Password = NewPasswordBox.Text, VerifyPassword = PasswordAgainBox.Text });
this.Invoke((MethodInvoker)delegate {
@@ -66,7 +66,7 @@ namespace OpenSaveCloudClient
PasswordAgainBox.Clear();
LockControls(false);
});
}).Start();
});
}
private void LockControls(bool l)