Threads werden nicht mehr im Konstruktor gestartet, um race conditions zu

vermeiden
This commit is contained in:
2014-05-01 18:10:01 +02:00
parent 9bf7abb465
commit 7ffba85903
6 changed files with 31 additions and 8 deletions

View File

@@ -62,7 +62,6 @@ namespace WorldOfPeacecraft
Message = new LinkedList<string> ();
LastLineRegex = new Regex ("^end:[0-9]+$");
ParserThread = new Thread (new ThreadStart (this.RunParser));
ParserThread.Start();
}
private void RunParser ()
@@ -454,12 +453,15 @@ namespace WorldOfPeacecraft
return LastLineRegex.IsMatch (lastLine);
}
public void Start ()
{
ParserThread.Start();
}
public void Stop ()
{
ParserThread.Abort ();
}
private class Block
{