public async Task InvokeAllDone(object sender, int totalEpochs, float finalError) { if (task != null) { await task; task.Dispose(); } task = Task.Run(() => AllDone?.Invoke(sender, new AllDoneArgs { TotalEpochs = totalEpochs, FinalError = finalError }) ); }
private void FireAllDone() => AllDone?.Invoke();