`stdin` will block a whole thread (this is not nim specific), so you need to spawn a reader thread to read from stdin, async will not work.
Note that how to read from `stdin` in a non-blocking way seems to be a popular question on Google search as there are Gevents, Python, D, Rust, Vala and Haskell threads about that.