JoystickWrapper
JoystickWrapper copied to clipboard
Improve locking - current method is too expensive
lock() is apparently quite expensive.
When one of the Subscribe endpoints is hit, kill the monitor thread, make the update, then re-start the monitor thread.
This will allow us to remove the lock() command from the monitor thread entirely.
Apparently, I need to call Interrupt on the thread, then Join on the thread to kill it.