public void Dispose() { Spark.Dispose(); // CSparkRunner will exit upon receiving newline from // the standard input stream. _process.StandardInput.WriteLine("done"); _process.StandardInput.Flush(); _process.WaitForExit(); _tempDirectory.Dispose(); }