I just posted an update to the LCD_LIveText class that emits events when a key is presses on the LCD Shield. Since the LCD_LiveText class uses an ExtendedTimer to periodically poll the keys and update the LCD the keypress events are fired in the same timer thread. For many things this would be OK, but in some cases you won’t want to call into a time consuming method directly from the timer thread as that makes the UI seem to ‘freeze’.
I used the following to generate a new thread to run my lengthy process in response to a key press event.
System.Threading.Thread testThread = new Thread(doSelect); testThread.Start();
This works very well but leaves me wondering what the lifetime of this new thread is. When the end of the called ‘doSelect’ method is reach is the thread automatically deleted?