title: Abandoning coroutines
body: <p>How bad is it in Lua 5.1 to never let a coroutine properly end? In other words, if a coroutine yields but I never resume it, does it leave a lot of state lying around until program completion?</p>
  
  <pre><code>cor=coroutine.wrap(somefunc)
  
  while true do
     done=cor()
     if done then -- coroutine exited with "return true" 
         break
     else -- coroutine yielded with "coroutine.yield(false)"
         if some_condition then break end
     end
  end
  
  function somefunc()
      -- do something
      coroutine.yield(false)
      -- do some more
      return true
  end 
  </code></pre>
  
  <p>Depending on <strong>some_condition</strong> in the pseudocode above, the coroutine might never be resumed, and thus might never properly "end".</p>
  
  <p>Could I do this to dozens of coroutines without having to worry? Is it safe to leave coroutines in this state? Is it expensive? </p>