title: Difference between subroutine , co-routine , function and thread?
body: <p>I have been reading the Art of Programming, vol 1, for the past 2 days.</p>
  <p>There is a topic about subroutine and coroutine.
  I am confused. I can't understand when the book says that coroutines are initialised later after main(), unlike subroutines. Furthermore, the invoked coroutine becomes a subroutine for a calling coroutine.</p>
  <p>I tried researching over previously asked question on here, where I came to know notions of functions and thread too, in the same context.
  The book gives an example about a coroutine using the MIX computer model.
  Can I get any simple pseudocode, using an example about coroutines and other terminologies in the context of today's high level languages?</p>
  <p>So, a related question: How to differ a subroutine, coroutine, function and thread?</p>