If a thread writes output (into sys.stdin) while a
command should be executed, the command you tried to
execute never finishes executing, so you are stuck.
For example, type this:
>>> from threading import Thread
>>> def f():
for i in range(200):
>>> t = Thread(target=f)
Now, while the numbers are showing, type Enter. After
the numbers stopped showing, you'll notive that you
can't execute anything, until you restart the shell.
I noticed this because I wrote a function which
executes at a seperate thread and writes to sys.stderr.
If I try to execute something while the output is being
printed, I get stuck.