aboutsummaryrefslogtreecommitdiffstats
path: root/util/promise.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.promise: Add all_settled, which follows semantics of allSettled from ES2020Matthew Wild2020-06-081-0/+22
|
* util.promise: Remove references to callbacks after settling promiseKim Alvefur2018-12-301-0/+3
| | | | This is to help the garbage collector.
* Many things: switch from hacky multi-arg xpcall implementations to a ↵Matthew Wild2018-10-261-0/+2
| | | | standard util.xpcall
* util.promise: Switch from pcall to xpcall to get tracebacks on exceptionsMatthew Wild2018-10-261-1/+1
|
* util.promise: Remove the non-standard ability to pass a promise to reject()Matthew Wild2018-10-261-3/+1
|
* util.promise: Fix missing parametersMatthew Wild2018-10-251-2/+2
|
* util.promise: Ensure chained promises always receive a value/rejection even ↵Matthew Wild2018-10-251-22/+23
| | | | if an intermediate promise has no handlers
* util.promise: Export is_promise()Matthew Wild2018-10-251-0/+1
|
* util.promise: Remove debug print and assertMatthew Wild2018-10-251-1/+0
|
* util.promise: Add promise.try()Matthew Wild2018-10-181-0/+6
|
* util.promise: Add a string representationKim Alvefur2018-10-181-0/+4
|
* util.promise: Add promise:finally()Matthew Wild2018-10-181-0/+6
|
* util.promise: Some code relocationMatthew Wild2018-10-181-23/+23
|
* util.promise: Also support automatic resolution by returning a promise from ↵Matthew Wild2018-10-181-1/+3
| | | | | | | an on_reject handler Originally unimplemented because it wasn't clear to me what the correct behaviour was, but the A+ spec is clear that both onFulfilled and onRejected may return a promise.
* util.promise: Fix promise.reject() to return a rejected promise, and fix ↵Matthew Wild2018-10-181-1/+1
| | | | buggy test for it
* util.promise: ES6-like API for promisesMatthew Wild2018-10-101-0/+133