Only post in continuation

Former-commit-id: 57258c6f5c
This commit is contained in:
Malte Rosenbjerg 2020-12-07 01:13:32 +01:00
parent 2fc64f3ac7
commit d172cb0dc7

View file

@ -65,7 +65,7 @@ void OnCancelEvent(object sender, EventArgs args)
{ {
errorCode = t.Result; errorCode = t.Result;
cancellationTokenSource.Cancel(); cancellationTokenSource.Cancel();
_ffMpegArguments.Post(); // _ffMpegArguments.Post();
}), _ffMpegArguments.During(cancellationTokenSource.Token).ContinueWith(t => _ffMpegArguments.Post())); }), _ffMpegArguments.During(cancellationTokenSource.Token).ContinueWith(t => _ffMpegArguments.Post()));
} }
catch (Exception e) catch (Exception e)
@ -111,7 +111,7 @@ await Task.WhenAll(instance.FinishedRunning().ContinueWith(t =>
{ {
errorCode = t.Result; errorCode = t.Result;
cancellationTokenSource.Cancel(); cancellationTokenSource.Cancel();
_ffMpegArguments.Post(); // _ffMpegArguments.Post();
}), _ffMpegArguments.During(cancellationTokenSource.Token).ContinueWith(t => _ffMpegArguments.Post())).ConfigureAwait(false); }), _ffMpegArguments.During(cancellationTokenSource.Token).ContinueWith(t => _ffMpegArguments.Post())).ConfigureAwait(false);
} }
catch (Exception e) catch (Exception e)