コード例 #1
0
ファイル: Joystick.cs プロジェクト: beaglebot/BeagleBot
 public void StopPolling()
 {
     if (pollingThreadState == PollingThreadState.Stopped) throw new ApplicationException("Can't stop polling as it isn't running.");
     pollingThreadState = PollingThreadState.Stopping;
 }
コード例 #2
0
		public PollingThread(PollingThreadSettings threadSettings, ILog log)
		{
			_log = log;
			ThreadSettings = threadSettings;
			_threadState = new PollingThreadState();
		}
コード例 #3
0
ファイル: Joystick.cs プロジェクト: beaglebot/BeagleBot
 public void StartPolling()
 {
     if (pollingThreadState != PollingThreadState.Stopped) throw new ApplicationException("Can't start polling as it is still running.");
     pollingThreadState = PollingThreadState.Running;
     pollingThread = new Thread(PollingThreadMain);
     pollingThread.IsBackground = true;
     pollingThread.Start();
 }