Eryn Lynn
fd120b5c76
Update CHANGELOG.md
2020-05-04 23:57:08 -04:00
Eryn Lynn
1ca3fff6f5
Use xpcall, revamp error handling
2020-05-04 23:56:49 -04:00
Eryn Lynn
344c9759aa
Update testez
...
Closes #1
2020-05-04 22:07:55 -04:00
Eryn Lynn
7c394f4d61
Remove unused files
2020-05-04 22:07:36 -04:00
eryn L. K
01499e5b7f
Merge pull request #19 from Quenty/users/quenty/avoid_realloc
...
Avoid reallocating another table for the _consumers() metatable, lead…
2020-03-29 18:16:49 -04:00
James Onnen
ffd4cd94a1
Avoid reallocating another table for the _consumers() metatable, leading to a 5%-10% speed up of the trivial Promise.new(function() end) case
2020-03-29 03:35:15 -07:00
eryn L. K
f0fd3020fd
Merge pull request #18 from Validark/patch-1
...
Optimize Promise.delay with linked-list impl
2020-02-28 21:21:16 -05:00
Eryn Lynn
5a4a30e221
Fix broken tests
2020-02-28 21:21:01 -05:00
Niles
4e6b0de633
Update init.lua
2020-02-14 15:08:53 -06:00
Niles
e1e183d632
Optimize Promise.delay with linked-list impl
...
- Always iterate over promises via `ipairs`
- Avoid pushing the call arguments stack to a table in Promise.prototype.expect and Promise.prototype.await
- Use a doubly-linked list implementation of a queue
The old queue/dequeue implementation used an array which:
- has items removed from the front (`table.remove(queue, 1)` O(n) each time)
- this is especially bad in the main loop which could run multiple times in-a-row on a large array
- new: O(1)
- uses table.insert() followed by table.sort() to add a new node (O(n log n))
- new: O(n)
- has to lookup the index of the node being dequeued (O(n))
- new: O(1)
2020-02-14 06:02:48 -06:00
Eryn Lynn
64ba0099f1
Pass error to executor runner
2020-02-12 19:59:04 -05:00
Eryn Lynn
87937962ad
Add traceback piping to more functions
2020-02-12 18:55:29 -05:00
Eryn Lynn
4ecdd156a5
awaitvalue -> expect
2019-11-12 23:14:18 -05:00
Eryn Lynn
85240d83b7
Fix rejection propagation issue
2019-11-12 23:07:43 -05:00
Eryn Lynn
f4202bdc0d
Fix timeout return value doc
2019-11-12 21:32:16 -05:00
Eryn Lynn
4daaf7ee5d
Update done docs
2019-09-30 20:50:05 -04:00
Eryn Lynn
de4a43d32e
Update CHANGELOG.md
2019-09-29 02:05:04 -04:00
Eryn Lynn
75d82b4909
Add allSettled, some, and any
...
Closes #10
Closes #11
Closes #5
2019-09-29 02:03:22 -04:00
Eryn Lynn
cef64024e6
Add Promise.delay, :timeout
...
Closes #8
Closes #7
2019-09-29 00:07:32 -04:00
Eryn Lynn
f32ebd35bb
Add docs warning
2019-09-28 23:29:00 -04:00
Eryn Lynn
bb13a0e2b6
Add Return and done
...
Closes #9
2019-09-28 22:03:06 -04:00
Eryn Lynn
3052ec1474
Add Promise.try
2019-09-28 18:54:49 -04:00
Eryn Lynn
f6c3dd163a
Make resolve/reject accept multiple values
...
Closes #4
2019-09-28 17:48:55 -04:00
Eryn Lynn
c0626c0baf
Make promisify catch errors
...
Closes #12
2019-09-28 17:38:35 -04:00
Eryn Lynn
65daff4777
Improve stack traces and errors
2019-09-28 05:14:53 -04:00
Eryn Lynn
f541fb7202
Remove status symbols
2019-09-28 01:56:58 -04:00
Eryn Lynn
4829a421db
Add Promise:tap
2019-09-28 01:33:06 -04:00
Eryn Lynn
1ca7dfbc3e
Fix #3
2019-09-28 01:06:29 -04:00
Eryn Lynn
e86c068ce2
Improve error messages
2019-09-28 00:44:18 -04:00
Eryn Lynn
d61ce8ed97
Add some comments
2019-09-28 00:19:29 -04:00
Eryn Lynn
17fac4d008
Make all/race cancel correctly
2019-09-28 00:13:30 -04:00
Eryn Lynn
3dbb121906
Make error more robust when misusing all/race
2019-09-27 18:46:10 -04:00
Eryn Lynn
213f7e3e64
Create rotriever.toml
2019-09-22 22:59:11 -04:00
Eryn Lynn
1a0ec7db47
Make Promise.is only check andThennable
2019-09-22 22:58:23 -04:00
Eryn Lynn
14587cd491
Move unhandled rejection warning to hb
2019-09-18 17:58:07 -04:00
Eryn Lynn
ffaff8a4b1
Make new/async more explicit
2019-09-18 16:42:15 -04:00
Eryn Lynn
0139ed512f
Fix Promise.promisify and add test
2019-09-15 02:50:53 -04:00
Eryn Lynn
8650aeffdb
Make Promise.promisify use coroutine.wrap
2019-09-13 22:58:32 -04:00
Eryn Lynn
9e40be2532
Update docs
2019-09-13 20:07:36 -04:00
Eryn Lynn
5541559c78
Make Promise.promisify use Promise.new
2019-09-13 20:01:40 -04:00
Eryn Lynn
783eb1c2bb
Add calls, awaitValue
2019-09-12 20:13:29 -04:00
Eryn Lynn
3d53e7a364
Update Examples.md
2019-09-12 04:02:48 -04:00
eryn L. K
9b17c3e1a3
Update README.md
2019-09-12 04:00:39 -04:00
Eryn Lynn
65bcf3fc17
Create usage guide
2019-09-12 03:59:02 -04:00
Eryn Lynn
bf733e642f
Make cancellation propagate downstream
2019-09-12 03:58:56 -04:00
eryn L. K
7c3ce0f809
Update README.md
2019-09-10 17:14:24 -04:00
Eryn Lynn
264ff27213
Add Promise.async
2019-09-10 17:12:00 -04:00
Eryn Lynn
c5fc5bff27
Merge branch 'master' of https://github.com/evaera/roblox-lua-promise
2019-09-10 16:01:10 -04:00
Eryn Lynn
62c06a2698
Update documentation
2019-09-10 16:00:43 -04:00
eryn L. K
204ab95dcb
Update README.md
2019-09-10 15:44:48 -04:00