Extract zips using background thread.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user