Aaron Piotrowski
3f2e0e1b72
Fix method name in wait() test
2016-11-14 16:29:49 -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
a8d7d71a1a
Drop Future and Producer
2016-08-17 21:17:31 -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
7bc08b9a6a
Replace leftover LogicExceptions exceptions with Error
2016-08-12 16:58:53 -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
Niklas Keller
74e2577b25
Rename fetch/storeState to get/setState
2016-08-06 14:49:08 +02:00
Niklas Keller
6cde9f5495
Merge Registry into Driver
2016-08-04 21:08:52 +02:00
Aaron Piotrowski
9055f159e7
Revert some() to v1 behavior
2016-07-31 00:31:04 -05:00
Aaron Piotrowski
5a06b1cdc1
Update tests and remove unused tests
2016-07-19 00:05:40 -05:00
Aaron Piotrowski
ade997688a
Merge branch 'awaitable' into v2
2016-07-18 23:20:05 -05:00
Aaron Piotrowski
3f654cbd5b
Initial tests plus some fixes
2016-07-12 11:20:06 -05:00
Bob Weinand
3603d5b1ec
EvLoop::enabled() -> supported()
2016-06-26 17:35:25 +02:00
Aaron Piotrowski
33338324d4
Add UvLoop
2016-06-09 12:57:46 -05:00
Aaron Piotrowski
666cc42a5f
Better ref/unref in EvLoop; fix EvLoopTest
2016-06-08 16:03:37 -05:00
Aaron Piotrowski
a49d333f1b
Add EvLoop; Split shared components into Loop
2016-06-08 09:22:14 -05:00
Aaron Piotrowski
ae441eb179
Fix DummyDriver
...
Conflict due to merge of #68
2016-05-31 10:08:10 -05:00
Aaron Piotrowski
5a82cd9b6b
Merge pull request #67 from async-interop/defer-callback
...
Put Loop::execute() $callback into Driver::defer()
2016-05-31 10:00:11 -05:00
Aaron Piotrowski
4aa8c5d550
Add loop tests
2016-05-27 15:07:05 -05:00
Aaron Piotrowski
237a9c45ad
Update registry test
2016-05-27 11:38:19 -05:00
Bob Weinand
b197b2c07d
Put Loop::execute() $callback into Driver::defer()
...
This also ensures that potential throwing in the callback will be handled inside a potential error handler instead of immediately falling through.
2016-05-26 23:45:27 +02:00
Aaron Piotrowski
7a2c5cdc88
Cleanup namespace
2016-05-26 10:05:17 -05:00
Niklas Keller
47edee535d
Forbid new factories while running, add scope test
2016-05-25 13:55:36 +02:00
Niklas Keller
3992374209
Apply ugly FIG braces style
2016-05-16 11:33:58 +02:00
Niklas Keller
8b3555c552
Change namespace of Registry
2016-05-16 11:02:14 +02:00
Niklas Keller
679651b242
Refactor Registry into a trait, so it can be tested separately
2016-05-16 11:02:13 +02:00
Chris Wright
6f4433dd1c
Add tests for resolve callables
2016-05-11 18:07:58 +01:00
Niklas Keller
7046ca47e1
Expose combined exceptions in combinator exception
...
Also fix indent, escape sequences and docs
2016-03-09 14:09:15 +01:00
Bob Weinand
4b667478f4
Fixed bug causing NativeReactor to run at 100% CPU
...
See also https://github.com/amphp/aerys/issues/68
2016-02-22 23:17:50 +01:00
Bob Weinand
72683085c5
Fix signal tests for when pcntl isn't loaded, but UvReactor is
2015-11-16 14:53:19 +01:00
Bob Weinand
3057329a5c
Update tests for CombinatorException, prepare tag 1.0.5
2015-09-30 14:31:53 +02:00
Daniel Lowrey
5cad406795
Normalize coroutine() return to Promise type
2015-08-07 11:01:36 -04:00
Daniel Lowrey
e209ee189d
Don't unload watchers when the run loop finishes
2015-08-05 13:13:16 -04:00
Daniel Lowrey
70f4971ae1
Remove stream() in favor of PromiseStream
2015-08-04 23:46:49 -04:00
Daniel Lowrey
98f609a99a
Clear watchers on run() loop exit, throw on invalid run/tick/stop calls
2015-08-04 11:07:13 -04:00
Daniel Lowrey
2c8727133e
functor argument is now optional in Amp\filter()
...
If no functor parameter is supplied, all results equal to FALSE
using a (bool) cast will be removed.
2015-08-01 13:28:41 -04:00
Daniel Lowrey
094899a74b
Add boolean "keep_alive" option for all watcher types
...
This option determines if the watcher will keep the run() loop
from returning. By default all watchers set "keep_alive" => true.
Setting this value to false is ideal for registering non-crucial
watchers (e.g. cache invalidation timers) that should run for the
life of the program but shouldn't prevent the event loop from
returning if all essential tasks have completed.
<?php
echo "before run\n";
run(function () {
immediately(function () {
echo "immediately\n";
});
once(function () {
echo "once\n";
}, 100, ["keep_alive" => false]);
repeat(function () {
echo "repeat\n";
}, 500, ["keep_alive" => false]);
echo "onStart end\n";
});
echo "after run\n";
The above snippet will have the following output:
before run
immediately
after run
The Amp\info() function now also reports the number of
keep_alive watchers currently registered via the "keep_alive" key.
2015-07-31 09:32:22 -04:00
Daniel Lowrey
b1f400cad5
misc v1 cleanup
2015-07-29 23:23:53 -04:00
Daniel Lowrey
56b6330114
Use object hashes as watcher IDs
2015-07-29 22:12:53 -04:00
Daniel Lowrey
8bcbba41a0
Move to procedural API
2015-07-29 16:59:53 -04:00
Daniel Lowrey
1d9d572ee5
promise updates are no longer variadic + misc formatting
2015-07-27 10:08:02 -04:00
Daniel Lowrey
38b3fbbbbb
move PromiseStream functionality into Amp\stream()
2015-07-23 15:23:45 -04:00
Daniel Lowrey
55e379e332
Rollback static coroutine methods to namespaced functions
2015-07-23 01:30:53 -04:00
Daniel Lowrey
f6be176a07
cleanup + tests
2015-07-22 11:38:17 -04:00
Daniel Lowrey
79a33c09fe
misc + testing
2015-07-21 23:59:20 -04:00
Daniel Lowrey
2cea028b1c
filter() updates and tests
2015-07-21 20:09:27 -04:00
Daniel Lowrey
932542f292
add map() combinator tests
2015-07-21 19:41:39 -04:00