mirror of
https://github.com/azaion/annotations.git
synced 2026-04-23 01:26:30 +00:00
huge queue refactoring:
3 queues -> 1 queue send delete validate updates
This commit is contained in:
@@ -46,7 +46,7 @@ public partial class App
|
||||
|
||||
private readonly ICache _cache = new MemoryCache();
|
||||
private IAzaionApi _azaionApi = null!;
|
||||
private CancellationTokenSource _mainCancelTokenSource = new();
|
||||
private CancellationTokenSource _mainCTokenSource = new();
|
||||
|
||||
private void OnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ public partial class App
|
||||
new ConfigUpdater().CheckConfig();
|
||||
var secureAppConfig = ReadSecureAppConfig();
|
||||
var apiDir = secureAppConfig.DirectoriesConfig.ApiResourcesDirectory;
|
||||
_inferenceClient = new InferenceClient(new OptionsWrapper<InferenceClientConfig>(secureAppConfig.InferenceClientConfig), _mainCancelTokenSource.Token);
|
||||
_inferenceClient = new InferenceClient(new OptionsWrapper<InferenceClientConfig>(secureAppConfig.InferenceClientConfig), _mainCTokenSource.Token);
|
||||
var login = new Login();
|
||||
|
||||
var loader = (IResourceLoader)_inferenceClient;
|
||||
@@ -244,7 +244,7 @@ public partial class App
|
||||
{
|
||||
var args = (KeyEventArgs)e;
|
||||
var keyEvent = new KeyEvent(sender, args, _formState.ActiveWindow);
|
||||
ThrottleExt.Throttle(() => _mediator.Publish(keyEvent), KeyPressTaskId, TimeSpan.FromMilliseconds(50));
|
||||
ThrottleExt.Throttle(() => _mediator.Publish(keyEvent, _mainCTokenSource.Token), KeyPressTaskId, TimeSpan.FromMilliseconds(50));
|
||||
//e.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user