lib: Code cleanup

This commit is contained in:
Hylke Bons 2012-07-22 11:51:56 +02:00
parent 9870ea4475
commit 7d9e963c73
2 changed files with 17 additions and 25 deletions

View file

@ -154,8 +154,7 @@ namespace SparkleLib {
AcceptHostKey (host_key, warn);
this.thread = new Thread (
new ThreadStart (delegate {
this.thread = new Thread (() => {
if (Fetch ()) {
Thread.Sleep (500);
SparkleHelpers.DebugInfo ("Fetcher", "Finished");
@ -173,8 +172,7 @@ namespace SparkleLib {
IsActive = false;
Failed ();
}
})
);
});
this.thread.Start ();
}

View file

@ -61,13 +61,7 @@ namespace SparkleLib {
if (repo.Name.Equals (repo_name) && !repo.IsBuffering &&
(repo.Status != SyncStatus.SyncUp && repo.Status != SyncStatus.SyncDown)) {
Thread thread = new Thread (
new ThreadStart (delegate {
repo.OnFileActivity (args);
})
);
thread.Start ();
new Thread (() => repo.OnFileActivity (args)).Start ();
}
}
}