you will need the thread that will moniter the char to stop the printing . Create the new thread and use getchar( ) in that thread this will continue with the printing . till you press 'e' or 'E' .