Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sanjosolutions/luacoroutine
A library for working with coroutines.
https://github.com/sanjosolutions/luacoroutine
wow wow-addon wow-addon-lib
Last synced: about 1 month ago
JSON representation
A library for working with coroutines.
- Host: GitHub
- URL: https://github.com/sanjosolutions/luacoroutine
- Owner: SanjoSolutions
- License: unlicense
- Created: 2022-11-04T12:27:43.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-31T06:52:42.000Z (about 1 year ago)
- Last Synced: 2024-05-01T19:25:51.704Z (9 months ago)
- Topics: wow, wow-addon, wow-addon-lib
- Language: Lua
- Homepage: https://www.patreon.com/addons_by_sanjo
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lua Coroutine
This work is devoted to God.
A library for working with coroutines. This can help other add-on creators to save some work.
## Functions included
* **Coroutine.runAsCoroutine** a function that runs the given function as coroutine the next frame.
* **Coroutine.runAsCoroutineImmediately** a function that runs the give function as coroutine this frame.
* **Coroutine.resumeWithShowingError** a function which resumes the coroutine and supports showing the error when the coroutine throws one.**The following functions can be used inside coroutines:**
* **Coroutine.waitFor** a function that waits until a function (predicate) returns true. An optional timeout is supported.
* **Coroutine.waitUntil** the same function as Coroutine.waitFor with a semantically different name.
* **Coroutine.waitForDuration** a function that waits for a specific duration.
* **Coroutine.yieldAndResume** a function which yields and schedules a resume.## How to use
Please see "[How to use Library](https://github.com/SanjoSolutions/LuaLibrary#how-to-use)" for how to use this library.
## Support
You can support me on [Patreon](https://www.patreon.com/addons_by_sanjo).