//trying to make this method multi-threaded, will return to this later. public void flashLED(ControllerLEDEnum LightId, int numberOfTimes) { FlashLEDParams inputParams = new FlashLEDParams(LightId, numberOfTimes); Thread workerThread = new Thread(this.flashLED_worker); //workerThread.Start(inputParams); flashLED_helper(LightId, numberOfTimes); }
//used when creating thread private void flashLED_worker(object input) { FlashLEDParams parameters = (FlashLEDParams)input; int numberOfTimes = parameters.numberOfTimes; ControllerLEDEnum LightId = parameters.LightId; flashLED_helper(LightId, numberOfTimes); }