Niklas Keller
944a2dd29d
Move Coroutine::__destruct to Placeholder
2019-05-31 11:38:02 -05:00
Niklas Keller
c12828081f
Fix exceptions bubbling from Coroutine::__destruct
...
This has been an edge case potentially hiding some exceptions. The tests have been refactored to error if the loop has watchers leaking from one test to another test.
2019-05-31 11:38:02 -05:00
Niklas Keller
fa3fe1d20b
Apply PSR-2
2018-06-18 20:00:01 +02:00
Niklas Keller
5dac863f37
Don't record stack traces in case of AMP_DEBUG not being set ( #218 )
...
Fixes #217 .
2018-04-26 00:32:31 +02:00
Aaron Piotrowski
4ef9af6dff
Check against "false"
2017-12-02 11:15:06 -06:00
Aaron Piotrowski
745a95ba67
Define AMP_DEBUG through environment
2017-12-02 10:23:12 -06:00
Aaron Piotrowski
7a05fe1316
Use static function for rethrow
2017-06-05 00:21:45 -05:00
Aaron Piotrowski
f78328822c
Allow for debugging of double iterator completion
2017-05-02 07:07:43 +02:00
Niklas Keller
8caae2253f
Allow recording stacktraces to debug double resolution
2017-03-29 17:25:44 +02:00
Aaron Piotrowski
2f7e9a0746
Run returned generator as coroutine from onResolve and onEmit callbacks
2017-03-27 18:37:55 -05:00
Niklas Keller
ce269fa516
Rename Promise::when to Promise::onResolve, resolves #77
2017-03-21 17:23:37 +01:00
Aaron Piotrowski
a927b3cb06
Separate functions into Promise and Stream namespaces
2017-03-15 19:02:04 -05:00
Aaron Piotrowski
2cc4cf9d0b
Fix use statement order
2017-03-12 12:23:48 -05:00
Aaron Piotrowski
7ad10f5d7d
Add support for React promises
2017-03-11 09:17:43 -06:00
Aaron Piotrowski
754a29e86c
Remove promise error handler
...
Exceptions thrown from when callbacks are now forwarded directly to the loop error handler.
2017-03-10 15:32:58 -06:00
Niklas Keller
0be9ae9ade
Switch from AsyncInterop\Promise to Amp\Promise
2017-03-10 21:58:46 +01:00
Niklas Keller
ae69e92266
Update to promise 0.4.0 and event-loop 0.5.0, add humbug config
2017-01-07 13:47:45 +01:00
Aaron Piotrowski
5651240615
Update to promise spec v0.3
...
Dropped strict-types due to spec requiring weak types in callbacks.
2016-12-29 16:29:27 -06:00
Niklas Keller
2a65c0735b
Fix docblock for Placeholder::when
2016-12-23 23:48:24 +01:00
Aaron Piotrowski
9927ad5b4f
Awaitable → Promise
2016-11-14 13:59:21 -06:00
Aaron Piotrowski
96e1178b89
Code, docblock, and comment cleanup
2016-08-17 22:25:54 -05:00
Aaron Piotrowski
bdc26e1e8b
Combine use statements
2016-08-16 13:07:51 -05:00
Aaron Piotrowski
888229d667
Use strict types
2016-08-15 23:46:26 -05:00
Aaron Piotrowski
69ec812bc0
Require PHP 7
2016-08-11 14:52:40 -05:00
Aaron Piotrowski
90d744537e
protected -> private in internal traits
2016-07-19 12:32:43 -05:00
Aaron Piotrowski
4ed8e65468
Cleaner resolution
2016-06-16 23:27:14 -05:00
Aaron Piotrowski
ae182165e5
Remove circular reference check
2016-06-14 21:53:50 -05:00
Aaron Piotrowski
055d7d4c52
Update docblocks
2016-06-01 12:18:11 -05:00
Aaron Piotrowski
6d263ffb84
Drop Awaitable from namespace
2016-05-23 22:48:28 -05:00
Aaron Piotrowski
13e807d564
Throw on repeated resolution
2016-05-23 21:32:41 -05:00
Aaron Piotrowski
378990fe86
Use $exception instead of passing as callback data
...
Less code this way
2016-05-22 13:43:37 -05:00
Aaron Piotrowski
c7f64ce2c0
Initial commit
2016-05-21 09:44:52 -05:00