Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sanjosolutions/luaresolvable

A library for working with resolvables. Resolvables are similar to promises or futures.
https://github.com/sanjosolutions/luaresolvable

wow wow-addon wow-addon-lib

Last synced: 23 days ago
JSON representation

A library for working with resolvables. Resolvables are similar to promises or futures.

Awesome Lists containing this project

README

        

# Resolvable

A library for working with resolvables. Resolvables are similar to promises or futures.
This library can save add-on developers some work.

## Things included

* **Resolvable.Resolvable**: a class for a resolvable.
* **Resolvable.Resolvable:new**: a constructor for creating a resolvable.
* **Resolvable.Resolvable:afterResolve** / **Resolvable.Resolvable.after**: a method for registering a callback which is called after the resolvable is resolved.
* **await** / **Resolvable.await**: a function for awaiting on a promise. Can only be used in a coroutine.
* **Resolvable.all**: a function for creating a new resolvable which resolves when all resolvables, that have been passed, have been resolved.

"**Resolvable.Resolvable:new**" returns a second return value, which is a table with internal methods which can be used
by the creator of the resolvable. Those include:

* **resolve**: a method to resolve the resolvable.