10

If a thread is waiting on a console.readline is the thread suspended. If not what is it's state?

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
DayOne
  • 1,027
  • 1
  • 11
  • 16
  • possible duplicate of [How to add a Timeout to Console.ReadLine()?](http://stackoverflow.com/questions/57615/how-to-add-a-timeout-to-console-readline) – Jesse C. Slicer Oct 27 '14 at 11:48

2 Answers2

17

The thread is not suspended. It's blocked on a method call.

dtb
  • 213,145
  • 36
  • 401
  • 431
1

There's not a good way to interact (i.e. wait for user input) with the console on a thread if the user doesn't ever enter information. This question (and my answer) came up with a way to terminate the input thread by having the readline in a separate process altogether.

Community
  • 1
  • 1
Jesse C. Slicer
  • 19,901
  • 3
  • 68
  • 87