Extract zips using background thread.

This commit is contained in:
Paul Chote
2011-01-20 23:48:18 +13:00
parent 84cc94bcb6
commit d32e2be941

View File

@@ -223,18 +223,21 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardOutput = true;
p.Start();
p.Start();
var t = new Thread( _ =>
{
// This is wrong, chrisf knows why
{
using (var reader = p.StandardOutput)
{
string s = reader.ReadLine();
if (string.IsNullOrEmpty(s)) continue;
{
// This is wrong, chrisf knows why
while (!p.HasExited)
{
string s = reader.ReadLine();
if (string.IsNullOrEmpty(s)) continue;
parseOutput(s);
}
}
}
}
onComplete();
}) { IsBackground = true };
t.Start();
}