Niklas Keller
50b37b23ef
Add asyncCall
2017-05-03 15:21:49 +02:00
Niklas Keller
1286087c06
Rename Pause to Delayed
...
Pause doesn't cover the delayed value use case.
2017-05-02 07:02:02 +02:00
Aaron Piotrowski
8ca8009074
Remove note about yielding in finally
...
Yielding in finally will work as long as the generator is not force closed (for example, a yielded promise is never resolved and the coroutine object is subsequently destroyed).
2017-04-25 14:29:10 -05:00
Aaron Piotrowski
e1491b1925
Handle invalid yield like a failed promise
2017-04-24 13:08:30 -05:00
Aaron Piotrowski
34192ceca5
Drop Coroutine::dispose()
2017-04-24 11:10:05 -05:00
Niklas Keller
79ab41e5bf
Update php-cs-fixer to version 2 and upgrade rules
...
This also fixes the code style according to the new rules.
2017-04-24 16:22:02 +02:00
Niklas Keller
e9d48a68d5
Rename createRunnable to asyncCoroutine and createCallable to coroutine
2017-04-24 15:27:04 +02:00
Niklas Keller
70e63a3748
Fix code style according to new rules
2017-04-24 15:27:04 +02:00
Niklas Keller
dfa40f5b00
Rename wrap to createRunnable and coroutine to createCallable
2017-04-24 15:27:04 +02:00
Aaron Piotrowski
cdf28fa938
Drop max continuation depth
...
It seems unlikely a real-world application would run out of memory due to call stack depth for normal coroutine continuations (that is, where infinite recursion is not root problem). Hopefully time will not prove me wrong…
2017-03-30 23:45:54 -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
Niklas Keller
dfab1d885f
Add missing coroutine tests
2017-03-14 22:32:14 +01:00
Niklas Keller
d8f3810310
Add more tests for functions.php
2017-03-14 22:15:36 +01:00
Aaron Piotrowski
fd7587b0fd
Fix risky tests
...
Fixes #81 .
2017-03-13 18:54:08 -05:00
Niklas Keller
e8ea4e2ba9
Implement yielding arrays as implicit all operator, fixes #68
2017-03-12 19:42:25 +01:00
Aaron Piotrowski
7ad10f5d7d
Add support for React promises
2017-03-11 09:17:43 -06:00
Niklas Keller
fe88413a17
Upgrade to PHPUnit 6
...
This commit removes Humbug, as it's no longer maintained and not
compatible with PHPUnit 6.
2017-03-11 14:57:03 +01:00
Niklas Keller
0be9ae9ade
Switch from AsyncInterop\Promise to Amp\Promise
2017-03-10 21:58:46 +01:00
Niklas Keller
e64bbfb9f5
Add Loop::set, auto-wrapping, fixup things
2017-03-10 21:31:57 +01:00
Aaron Piotrowski
0a79a063a6
Drop redundant tests
...
Covered by testInvalidYieldCatchingThrownException and testInvalidYieldCatchingThrownExceptionAndThrowing.
2017-01-08 00:34:41 -06:00
Niklas Keller
3b46c168a5
Improve tests and kill some Humbug mutants
2017-01-07 22:55:34 +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
Aaron Piotrowski
8ef760f53c
More tests
2016-12-17 08:16:17 -06: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
36bfc3e20a
Fix namespace
2016-08-16 23:27:10 -05:00
Aaron Piotrowski
8eda038155
Use strict types in tests; update some tests
2016-08-16 16:39:25 -05:00
Aaron Piotrowski
496152282e
Update Amp\coroutine() tests
2016-08-12 16:56:13 -05:00
Aaron Piotrowski
69ec812bc0
Require PHP 7
2016-08-11 14:52:40 -05:00
Aaron Piotrowski
3f654cbd5b
Initial tests plus some fixes
2016-07-12 11:20:06 -05:00