Commit graph

54 commits

Author SHA1 Message Date
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
Eryn Lynn
5d6c784e6d Update readme 2019-09-10 15:41:59 -04:00
Eryn Lynn
9a1d1c3530 Update for release 2019-09-10 15:34:06 -04:00
Eryn Lynn
6a3531de1e Update LICENSE 2019-09-10 00:29:21 -04:00
Eryn Lynn
154dc3cf9e Revert to using BindableEvents for await 2018-11-09 03:40:40 -05:00
Eryn Lynn
601127071c Call cancellation hook immediately if already cancelled 2018-11-09 00:00:40 -05:00
Eryn Lynn
cda921e793 Update await to use coroutine.yield
And add compatability with cancellation by returning nil.
2018-11-08 23:50:07 -05:00
Eryn Lynn
617c2753bc Update docs 2018-10-24 03:11:24 -04:00
Eryn Lynn
4f5ed034e0 Add type assertion to onCancel 2018-10-24 03:10:20 -04:00
Eryn Lynn
dbcad4ab4b Add docs 2018-10-24 02:54:32 -04:00
Eryn Lynn
99cb3d62f5 Fully implement finally and cancellation 2018-10-24 02:33:30 -04:00
Eryn Lynn
c55f9f1310 Merge branch 'finally' into finally-and-cancellation 2018-10-23 19:16:15 -04:00
Eryn Lynn
4b95be24d5 Add promise:finally 2018-10-23 19:14:29 -04:00
Eryn Lynn
774e9c62c5 Implement promise cancellation 2018-10-23 19:12:05 -04:00
Lucien Greathouse
3b30a3fa70 Remove extra synchronization in Promise.all 2018-09-14 18:47:57 -07:00
Lucien Greathouse
23a3b629d6 Switch type marker to be a special symbol, so it's less likely to conflict 2018-09-14 13:53:13 -07:00
Lucien Greathouse
9bda3e68ea Make Promise.new refer to the created promise as 2018-09-14 13:47:51 -07:00
Lucien Greathouse
639f0e8419 Formatting and comment wrapping 2018-09-14 13:47:10 -07:00
Lucien Greathouse
d8c3bb9264 Convert Promise.Status to be a userdata with __tostring 2018-09-14 13:45:27 -07:00
Lucien Greathouse
8dd394cccd Move Promise member methods onto Promise.prototype 2018-09-14 13:43:22 -07:00
Lucien Greathouse
7921abb625 Remove last case of manual 2018-09-14 13:41:32 -07:00
Lucien Greathouse
bb68da5e5b Style cleanup 2018-09-14 13:39:27 -07:00
Lucien Greathouse
3c9881a478 Vararg cleanup and test robustness improvements 2018-09-14 13:38:52 -07:00
Lucien Greathouse
40acffb2f0 Improve robustness of Promise.all tests 2018-09-14 11:31:24 -07:00
Eryn Lynn
371f08598c Implement Promise.all (#4) 2018-09-14 11:17:06 -07:00
Lucien Greathouse
e6b43a1fae
Make multiple return values be handled correctly in all (?) cases (#3) 2018-07-05 15:49:25 -07:00
Lucien Greathouse
e785799141 Fix missing unpack case, still not ideal 2018-06-16 20:04:01 -07:00
Lucien Greathouse
6c6eef6a3b Store length of _values explicitly.
This fixes some cases where middle-nils would drop values.
Not all cases are fixed because of the definition of wpcall,
which could be rectified by replacing it.
2018-06-16 19:47:21 -07:00
Lucien Greathouse
bf3a3cf422 Rename internal _value field to _values 2018-06-16 19:42:14 -07:00
Lucien Greathouse
5010fa389a Add Promise:getStatus() for checking on a promise's current status 2018-06-16 19:40:57 -07:00
Lucien Greathouse
8828d467c4 Use xpcall instead of pcall to create better stack traces 2018-05-21 14:13:53 -07:00
Lucien Greathouse
7fb09d103f Update to Promise version from Rojo, which changes await() 2018-04-20 23:25:23 -07:00
Lucien Greathouse
9bc03fc001 Update the repository for prime-time 2018-04-11 15:26:54 -07:00
Lucien Greathouse
bafeb68973 Fix comment grammar 2018-02-01 11:22:01 -08:00
Lucien Greathouse
3ca1885cc2 Add .gitignore and .luacov 2018-02-01 11:21:41 -08:00
Lucien Greathouse
3dda05030b Improved test coverage 2018-01-31 15:39:27 -08:00