From 951c90b35075a8f5a44958650592d6e445efb0bc Mon Sep 17 00:00:00 2001 From: charlieknoll Date: Fri, 31 Mar 2017 15:18:19 -0600 Subject: [PATCH] Update README.md Dispose the cancellationTokenSouce in order to prevent it from firing after Task is complete --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 76440fc..2361971 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ public async Task RunCommandWithTimeout(string filename, string arguments, TimeS try { var processResults = await ProcessEx.RunAsync(processStartInfo, cancellationTokenSource.Token); + cancellationTokenSource.dispose(); } catch (OperationCanceledException) {