Skip to content

Instantly share code, notes, and snippets.

View mhutch's full-sized avatar

Mikayla Hutchinson mhutch

View GitHub Profile
@mhutch
mhutch / StartProcess.cs
Last active October 4, 2015 11:38
Taskified StartProcess
using System;
using System.IO;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
//MIT license, from MonoDevelop ProcessUtils.cs
public static Task<int> StartProcess (ProcessStartInfo psi, TextWriter stdout, TextWriter stderr, CancellationToken cancellationToken)
{
var tcs = new TaskCompletionSource<int> ();