Removed ThreadPool threads in favour of plain threads.

See
NyxStudios/TerrariaAPI-Server@b1d62b6cbd
for details.
This commit is contained in:
Tyler Watson 2016-05-10 23:45:14 +10:00
parent a7ac433bfa
commit 4eca66a024
4 changed files with 36 additions and 20 deletions

View file

@ -36,7 +36,16 @@ namespace TShockAPI
public UpdateManager()
{
ThreadPool.QueueUserWorkItem(CheckForUpdates);
Thread t = new Thread(() => {
do {
CheckForUpdates(null);
} while (true);
});
t.Name = "TShock Update Thread";
t.IsBackground = true;
t.Start();
}
private void CheckForUpdates(object state)
@ -53,7 +62,6 @@ namespace TShockAPI
}
Thread.Sleep(CheckXMinutes * 60 * 1000);
ThreadPool.QueueUserWorkItem(CheckForUpdates);
}
public void UpdateCheck(object o)