# coroutine(ロブロックス ライブラリ) > A function that executes alongside the main thread. - URL:https://roblox.minecraft-okinawa.com/reference/libraries/coroutine/ - 公式:https://create.roblox.com/docs/reference/engine/libraries/coroutine ## 関数 - `coroutine.close(co: thread): bool, Variant`:Closes and puts the provided coroutine in a dead state. - `coroutine.create(f: function): thread`:Creates a new coroutine, with body f. f must be a Luau function. - `coroutine.finally(co: thread, callback: Variant)`:Registers a callback to invoke when a coroutine finishes, errors, or is closed. - `coroutine.isyieldable(): bool`:Returns true if the coroutine this function is called within can safely yield. - `coroutine.resume(co: thread, ...: Variant): bool, Variant`:Starts or continues the execution of coroutine co. - `coroutine.running(): thread`:Returns the running coroutine. - `coroutine.status(co: thread): string`:Returns the status of coroutine co as a string. - `coroutine.wrap(f: function): function`:Creates a new coroutine and returns a function that, when called, resumes the coroutine. - `coroutine.yield(...: Tuple): Tuple`:Suspends execution of the coroutine. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)