Commit graph

186 commits

Author SHA1 Message Date
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
Lucien Greathouse
8f093eec98 Simplified Promise.all implementation 2018-01-31 15:39:21 -08:00
Lucien Greathouse
a25ad236ae Start implementing tests, add lemur and testez dependencies 2018-01-31 15:29:04 -08:00
Lucien Greathouse
8b1573ce41 Rename, implement Promise.all 2018-01-31 13:43:09 -08:00
Lucien Greathouse
d9bd6bbd3c Initial dump 2018-01-25 17:21:58 -08:00