private void ThreadFunctionSync()
 {
     while (running)
     {
         action();
         SyncEvent.WaitOne(100);
     }
 }