private void PerformSyncThread ()
{
try {
while (true) {
sync_thread_wait.WaitOne ();
if (sync_thread_dispose) {
break;
}
PerformSyncThreadCycle ();
}
lock (sync_mutex) {
sync_thread_dispose = false;
sync_thread_wait.Close ();
sync_thread_wait = null;
sync_thread = null;
}
} catch (Exception e) {
Log.Exception (e);
}
}