# coroutine Library ♻️

Provides functions to create and manipulate coroutines (collaborative threads). Accessed via coroutine.<function>.

Function Signature Description
coroutine.create(f) Creates a new coroutine with body f, returns the coroutine object.
coroutine.resume(co, ...) Starts or continues execution of coroutine co, passing arguments.
coroutine.running() Returns the currently running coroutine object.
coroutine.status(co) Returns the status of coroutine co ("running", "suspended", etc.).
coroutine.wrap(f) Creates a coroutine, returns a function that resumes it on each call.
coroutine.yield(...) Suspends execution of the calling coroutine, passing arguments back.