-1

if one thread stucks in "gets" command then it does not allow any other thread to printf any thiing. i have also tried scanf but the same result. what should i do. i want other threads to print on command line but they did not if one of the threads stucks in "gets" or scanf.

plz help me out

thnx in advancce

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Ancient Dragon
0

The console is a shared resource among all threads. It would be just a jumbled mess if one thread tried to output text to the console screen at the same time you are trying to input text with fgets(). I would think you need to redesign the threads so that confusion doesn't happen.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.