Coroutines are similar to threads, however they do not run simultaneously. They offer a way to split up tasks and dynamically pause & resume functions.
boolean, vararg coroutine.resume( thread coroutine, vararg args )
Resumes the given coroutine and passes the given vararg to either the function arguments or the coroutine.yield that is inside that function and returns whatever yield is called with the next time or by the final return in the function.
string coroutine.status( thread coroutine )
Returns the status of the coroutine passed to it, the possible statuses are "suspended", "running", and "dead".
coroutine.wait( number duration )
Yields the coroutine for the given duration before continuing. This only works inside a coroutine. This function uses CurTime instead of RealTime.
function coroutine.wrap( function coroutine )
Returns a function which calling is equivalent with calling coroutine.resume with the coroutine and all extra parameters.