How to quit thread or timeout stdin read?

Trying to kill the thread is the wrong way.
Setting a timeout is the way to go.
See: Io - polling for key down event - how to?

1 Like