1
0
mirror of https://github.com/danog/amp.git synced 2024-12-11 08:59:46 +01:00
Commit Graph

764 Commits

Author SHA1 Message Date
Daniel Lowrey
0e9c4a1818 Require Reactor when instantiating Promisor implementations 2014-11-24 23:17:43 -05:00
Daniel Lowrey
1cb293b776 Remove Combinator/Resolver in favor of functions
This commit removes the Combinator and Resolver classes altogether.
The relevant functionality is now concentrated entirely in the
analogous functions:

- all()
- some()
- any()
- first()
- map()
- filter()
- resolve()

Additionally, all Promisor implementations now *require* a Reactor
upon instantiation. Previously this parameter could be null and the
static singleton reactor instance would be used automatically.
2014-11-24 23:14:07 -05:00
Daniel Lowrey
398c1a6790 Don't hammer the CPU with NOWAIT ticks 2014-11-18 10:08:34 -05:00
Daniel Lowrey
2d5a1eb643 Allow multiple IO watchers on a stream without borking libuv 2014-11-18 10:08:34 -05:00
Daniel Lowrey
ccc0bdcbe0 Remove unused Reactor constants 2014-11-18 10:08:34 -05:00
Daniel Lowrey
d5c494afb1 Implement safer struct usage 2014-11-18 10:08:34 -05:00
Daniel Lowrey
2a84f46853 Fix breakage if ext/openssl missing in windows 2014-11-18 10:08:34 -05:00
Daniel Lowrey
874e7dab90 Formalize resolver yield commands 2014-11-05 11:56:35 -05:00
Daniel Lowrey
c28e143828 Remove watchStream() ... aliases are bad 2014-11-05 11:50:46 -05:00
Daniel Lowrey
70222364d5 Use singleton reactor instance in functions 2014-11-04 09:46:12 -05:00
Daniel Lowrey
2fd6538e47 Fix infinite loop on nested immediately watchers in LibeventReactor 2014-10-22 22:18:34 -04:00
Daniel Lowrey
7b11a8e0c3 Rename any() -> some(), change any() to never fail 2014-10-22 18:14:43 -04:00
Daniel Lowrey
f1f967e0ce Fix file permissions 2014-10-22 18:14:15 -04:00
Daniel Lowrey
634d978aeb Simplify reactor onStart() callback invocation 2014-10-22 18:14:01 -04:00
Daniel Lowrey
21e7ddbff9 Add key shortcuts, fix tick starvation when resolving looped yields 2014-10-22 18:12:36 -04:00
Daniel Lowrey
d719e302a6 Fix syntax error 2014-10-20 12:08:09 -04:00
Andrey Janzen
27a0b8ff2c add missed $func passing in map() & filter() 2014-10-15 18:07:35 +04:00
Daniel Lowrey
bd1cf64101 Use global reactor if not passed to Future::__construct() 2014-10-08 16:46:08 -04:00
Daniel Lowrey
b73a33da63 Fix bug causing immediate() callback starvation 2014-09-24 12:22:24 -04:00
Daniel Lowrey
969d15ebe8 Add Combinator class 2014-09-23 23:47:20 -04:00
Daniel Lowrey
7064ec5dc8 Migrate repo to amphp/amp 2014-09-23 00:06:03 -04:00
Daniel Lowrey
56e720cd50 Merge concurrency primitives 2014-09-22 22:21:22 -04:00
Daniel Lowrey
df47c6f09b Use string watcher IDs 2014-08-22 14:08:31 -04:00
Daniel Lowrey
1f2420c80c Allow access to underlying php-uv loop resource 2014-08-19 14:20:04 -04:00
Daniel Lowrey
c7c5b0ba8f Standardize all watcher invocation params to: func($reactor, $watcherId, $data) 2014-08-09 10:30:32 -04:00
Daniel Lowrey
92f1ae05f5 Use writability hack to improve zero-delay repeating UV watchers 2014-08-08 17:08:28 -04:00
Daniel Lowrey
609cc2ddfe Always use fresh call stack for immediatelies in UvReactor 2014-08-08 16:39:11 -04:00
Daniel Lowrey
c1521d6d7c Always execute immediately watchers in fresh call stack 2014-08-08 14:23:00 -04:00
Daniel Lowrey
1aa1778401 Don't invoke onStart callback in UvReactor::run() when empty 2014-08-08 14:15:23 -04:00
Daniel Lowrey
58137cdb32 Add docblocks 2014-08-08 12:26:08 -04:00
Daniel Lowrey
d71d9cd564 lowercase NULLs 2014-08-07 01:35:05 -04:00
Daniel Lowrey
2dfc44e548 Reactor::at() now accepts unix timestamp as well as strtotime() parsable string 2014-08-06 21:29:08 -04:00
Daniel Lowrey
ba70840e8b Update documentation 2014-08-06 16:01:24 -04:00
Daniel Lowrey
75e43cdcf8 Reorder Reactor::watchStream() params 2014-08-06 15:52:43 -04:00
Daniel Lowrey
f040981bdf Fixed bad callback declaration in UvReactor::onSignal watchers 2014-08-06 14:33:27 -04:00
Daniel Lowrey
0dfac49cd2 Fix minor screwups, normalize casing, etc 2014-08-06 14:26:03 -04:00
Daniel Lowrey
15b7b4ad80 Add UvReactor signal handling support 2014-08-06 00:32:13 -04:00
Daniel Lowrey
b375f048d4 Fix UvReactor memory leak where one-time watchers were never cleared 2014-08-06 00:25:47 -04:00
Daniel Lowrey
5878430a0c Update Reactor WATCH constants, remove Reactor::POLL_SOCK 2014-08-06 00:25:47 -04:00
Daniel Lowrey
d0e98a1498 minor cleanup 2014-08-02 02:10:31 -04:00
Daniel Lowrey
9f9a2d8b6b Cache static resources to minimize call overhead, add documentation 2014-08-02 02:09:39 -04:00
Daniel Lowrey
c3650dce88 Fixed really epic syntax fail 2014-08-02 01:09:07 -04:00
Daniel Lowrey
6777532a66 Added functions, reactor globals 2014-08-01 15:37:02 -04:00
Daniel Lowrey
d5b6266a82 Pass Reactor instance to onStart callbacks 2014-07-18 16:56:02 -04:00
Daniel Lowrey
bbd2ca2075 Add libuv php-uv event reactor 2014-06-11 12:33:15 -04:00
Daniel Lowrey
c2b311eebb Miscellaneous changes 2014-06-11 12:24:46 -04:00
Daniel Lowrey
2f039ac6d2 SignalReactor doc updates 2014-06-11 11:01:46 -04:00
Daniel Lowrey
4ad6dae260 Clear stop exception before throwing 2014-06-11 10:16:22 -04:00
Daniel Lowrey
4fda4967b2 Fix broken Reactor::at millisecond resolutions 2014-06-11 10:08:19 -04:00
Daniel Lowrey
b0a76277bb Fix endless native loop when no watchers remain 2014-06-11 10:03:44 -04:00
Daniel Lowrey
1762f9d69d Remove concurrency primitives (moved to separate repo) 2014-04-27 00:17:40 -04:00
Daniel Lowrey
d48db61ea9 Use mutable Promisor by default 2014-04-25 22:30:01 -04:00
Daniel Lowrey
3b2feb82bc Add SignalHandler interface 2014-04-22 23:12:05 -04:00
Daniel Lowrey
c4c65027dd Removed unnecessary clutter 2014-04-22 20:49:05 -04:00
Daniel Lowrey
62c3503abb Add libevent onSignal handler 2014-04-22 20:45:20 -04:00
Daniel Lowrey
7b351454f9 Minor edge-case updates 2014-04-14 17:06:08 -04:00
Daniel Lowrey
16c17244e8 Add preliminary future combinators 2014-04-09 10:37:29 -04:00
Daniel Lowrey
6a613c7356 Add immutable Failure/Success futures 2014-04-09 10:34:28 -04:00
Daniel Lowrey
89c78dab6b Unresolved is now the default pending future implementation 2014-04-09 10:33:50 -04:00
Daniel Lowrey
8a193b1a8e Future is now an interface 2014-04-09 10:32:07 -04:00
Daniel Lowrey
885969ff84 Time intervals now expressed in milliseconds (was seconds) 2014-03-07 12:02:03 -05:00
Daniel Lowrey
bdd340c3f3 Trim Promise/Future API down to the essentials 2014-03-06 21:34:58 -05:00
Daniel Lowrey
aed5c84c03 Add Future/Promise implementation 2014-03-06 11:47:50 -05:00
Daniel Lowrey
861cb58023 File structure reorganization 2014-03-06 09:53:16 -05:00