Daniel Lowrey
e209ee189d
Don't unload watchers when the run loop finishes
2015-08-05 13:13:16 -04:00
Daniel Lowrey
a7b057ace1
Add leading namespace slash for built-in functions
2015-08-04 23:58:49 -04:00
Daniel Lowrey
cf206dd898
Add "state" key to Amp\info() return array
2015-08-04 23:47:20 -04:00
Daniel Lowrey
70f4971ae1
Remove stream() in favor of PromiseStream
2015-08-04 23:46:49 -04:00
Daniel Lowrey
7c35dc7efd
Fix keep_alive refcount off-by-one error in reactor implementations
2015-08-04 23:11:52 -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
f840ee4334
update incorrect docblock
2015-08-01 23:03:25 -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
705c57483b
Fail promise timeout() operations using TimeoutException
2015-07-31 15:50:27 -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
bdd8503cbe
init() -> driver()
2015-07-31 09:32:21 -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
e18b090902
use fully qualified namespace for global functions
2015-07-23 01:32:52 -04:00
Daniel Lowrey
55e379e332
Rollback static coroutine methods to namespaced functions
2015-07-23 01:30:53 -04:00
Daniel Lowrey
a4636851d6
remove deprecated functions
2015-07-22 14:49:40 -04:00
Daniel Lowrey
7335cb2517
use explicit FQDN for compile time optimizations
2015-07-22 13:54:29 -04:00
Daniel Lowrey
09e000a6d7
allow nested tick
2015-07-22 13:12:21 -04:00
Daniel Lowrey
1fa9771dde
update coverage ignore
2015-07-22 13:12:14 -04:00
Daniel Lowrey
505c59d0e3
minor cleanup
2015-07-22 12:34:42 -04:00
Daniel Lowrey
f6be176a07
cleanup + tests
2015-07-22 11:38:17 -04:00
Daniel Lowrey
cdc5fecd47
Remove Streamable interface
2015-07-22 00:10:09 -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
33fd20acb3
add tests
2015-07-21 17:25:18 -04:00
Daniel Lowrey
dcab6907c0
minor cleanup
2015-07-21 17:25:11 -04:00
Daniel Lowrey
d6b674b93b
Move coroutine functions into new Coroutine class
2015-07-21 16:14:50 -04:00
Daniel Lowrey
564a81c519
misc updates + tests
2015-07-21 12:25:34 -04:00
Daniel Lowrey
c8bbf8208f
misc updates
2015-07-20 22:40:06 -04:00
Daniel Lowrey
0e6560070b
misc updates and tests
2015-07-20 22:27:11 -04:00
Daniel Lowrey
10037fe859
Miscellaneous reactor cleanup
2015-07-20 15:42:56 -04:00
Daniel Lowrey
288530d296
Add EvReactor
2015-07-20 15:42:42 -04:00
Daniel Lowrey
28154b4d70
Fix missing stream property assignment
2015-07-19 13:53:26 -04:00
Daniel Lowrey
d8a0c147e6
Add manual watcher refcount manipulation methods
2015-07-10 15:36:13 -04:00
Daniel Lowrey
4d4e9bad32
Replace BaseException refs with Throwable
2015-07-07 10:15:57 -04:00
Daniel Lowrey
ad96a584d5
Check coroutine nesting level before incurring "next tick" overhead
2015-06-16 12:08:24 -04:00
Daniel Lowrey
c7d0f3f86e
error traceback improvement
2015-06-16 11:10:53 -04:00
Daniel Lowrey
40fbb6e16d
Minor coroutine refactoring/optimization; add makeGeneratorError()
2015-06-16 10:59:44 -04:00
Daniel Lowrey
1d777c7e3e
Remove custom coroutine promisifier support
2015-06-15 17:53:58 -04:00
Markus Staab
f06f803e76
fixed code to adhere to the phpdoc'ed description
2015-06-15 17:47:02 -04:00
Daniel Lowrey
1a891f54ac
Remove streamable support in coroutine resolution
2015-06-15 13:17:27 -04:00
Daniel Lowrey
57c0f222ea
Support extended generator error debugging output in PHP7
2015-06-15 11:56:42 -04:00
Daniel Lowrey
deedb4a7fa
minor coroutine optimization to avoid extra valid() fcall
2015-06-15 10:58:24 -04:00
Bob Weinand
298357f760
We need to check for Generator::getReturn() in ≥ PHP 7
2015-06-13 18:37:04 +02:00
Daniel Lowrey
8a8930c8fd
Fix exception breakage across 5.x/7 environments
2015-06-11 15:22:14 -04:00
Daniel Lowrey
7ce6734976
Fix potential illegal offset access
2015-06-10 15:32:02 -04:00
Bob Weinand
80fb080470
I/O watchers must be always cleared, even if disabled
...
Not clearing I/O watcher lead to a leftover disabled watcher, so that streamIdPollMap still contains a disabled watcher with the flag.
Which may lead to a new watcher of same type not triggering an uv_poll_start().
2015-06-10 20:10:33 +02:00
Daniel Lowrey
f2a0488d87
Add Amp\promises() to coalesce values/promises/promisors to promises
2015-06-09 11:49:22 -04:00
Daniel Lowrey
1ac3d96d24
Remove Exception hint because it breaks on PHP7 BaseException
2015-06-08 15:11:17 -04:00
Daniel Lowrey
e923ea3fde
minor timeout function/test cleanup
2015-05-31 20:18:42 -04:00
Daniel Lowrey
34088cbf52
Add timeout() function
2015-05-31 20:13:39 -04:00
Daniel Lowrey
905d5bfc2c
update docblock
2015-05-31 19:51:09 -04:00
Daniel Lowrey
954eaabcf5
Make promise updates variadic (ugly)
2015-05-31 19:33:55 -04:00
Daniel Lowrey
48d8aaf0e5
Correctly clear UvReactor once() watchers
2015-05-31 12:06:25 -04:00
Daniel Lowrey
31f21da9e9
Improve Deferred performance switching
2015-05-27 22:03:08 -04:00
Daniel Lowrey
0c4f04c6ab
Fix missing parameter if coroutine invoked without args
2015-05-27 18:33:57 -04:00
Bob Weinand
6c440b2797
Fix fatal error upon wrong key type
2015-05-27 23:36:22 +02:00
Daniel Lowrey
05e3ecc423
Fix bug incorrectly clearing repeat watcher when disabled
2015-05-26 03:03:32 -04:00
Daniel Lowrey
5e7d6ff095
Fix coroutine fatal if initial advance errored
2015-05-25 12:51:50 -04:00
Daniel Lowrey
0c0395f7a0
Fix UvReactor bugs
2015-05-25 12:47:04 -04:00
Daniel Lowrey
f024061d22
Fix buggy PromiseStream behavior
2015-05-23 16:46:55 -04:00
Daniel Lowrey
35a601964e
don't use 0b constant values because bitwise comparisons aren't used
2015-05-20 21:28:34 -04:00
Daniel Lowrey
e8ac57db31
make function name consistent with others
2015-05-20 20:09:30 -04:00
Daniel Lowrey
29cde175b3
Minor coroutine resolution updates
2015-05-20 19:51:03 -04:00
Daniel Lowrey
c86d6cc930
don't swallow caught exception
2015-05-20 18:29:45 -04:00
Daniel Lowrey
0255049bbb
Don't use php7 ReflectionGenerator in PHP5.x branch
2015-05-20 18:19:23 -04:00
Daniel Lowrey
e6f1386b31
Fix double promisor resolve under error condition
2015-05-20 18:16:42 -04:00
Daniel Lowrey
71f9687cff
Reactor watcher option "callback_data" renamed "cb_data"
2015-05-20 15:21:59 -04:00
Daniel Lowrey
c7e4e8d0c3
Miscellaneous function changes (more after jump)
...
- Combinator functions optimized for performance
- Amp\reactor() now accepts an optional assignment parameter for
modifying the global default event reactor instance to allow for
third-party Reactor implementations.
- Renamed functions:
. Amp\getReactor() -> Amp\reactor()
- Removed functions:
. Amp\chooseReactor()
. Amp\tick()
. Amp\immediately()
. Amp\once()
. Amp\repeat()
. Amp\onReadable()
. Amp\onWritable()
. Amp\onSignal()
. Amp\enable()
. Amp\disable()
. Amp\cancel()
2015-05-20 15:18:30 -04:00
Daniel Lowrey
9fa6010f19
Optimize non-promise pipe() case
2015-05-19 23:12:32 -04:00
Daniel Lowrey
c8d6a0b5b3
Optimize coroutine resolution for performance
2015-05-19 23:07:29 -04:00
Daniel Lowrey
fc600d46ab
Pass optional data parameter to when/watch callbacks
2015-05-19 18:49:38 -04:00
Daniel Lowrey
879b1229d1
Minor PromiseStream fixes
2015-05-19 16:20:53 -04:00
Daniel Lowrey
ca82ac5362
Fix NativeReactor bug breaking tick sleep timing
2015-05-19 16:13:53 -04:00
Daniel Lowrey
44d52cdf2f
Rename AMP_DEBUG -> AMP_PRODUCTION_MODE
2015-05-19 14:56:22 -04:00
Daniel Lowrey
de905a6104
Correct Pause implementation for use with new trait system
2015-05-19 14:10:53 -04:00
Daniel Lowrey
7e16326871
remove scalar typehint from 5.x-compatible code
2015-05-19 14:05:41 -04:00
Daniel Lowrey
e3e01c993c
Add Amp\Streamable interface for buffered generator resolution
2015-05-19 12:03:26 -04:00
Daniel Lowrey
2a0486cb3c
Add Amp\pipe() function to pipe eventual results through a functor
2015-05-19 11:31:01 -04:00
Daniel Lowrey
30245d6817
Add optional callback data param in Deferred::__construct()
2015-05-19 11:16:04 -04:00
Daniel Lowrey
1ed5e69c52
Move buffering to PromiseStream for custom behavior in extended instances
2015-05-19 01:09:23 -04:00
Daniel Lowrey
68719d8023
Unresolved -> PrivatePlaceholder
2015-05-19 00:29:27 -04:00
Daniel Lowrey
953c4612e6
Future -> Deferred
2015-05-19 00:21:33 -04:00
Daniel Lowrey
3af013d418
Expose boolean AMP_DEBUG for performance tuning
...
Amp Future instances double both as Promisor and Promise
implementations when AMP_DEBUG is defined and set to false.
This switch allows private Promise resolution safety by
default at the expense of performance.
Amp applications should set AMP_DEBUG to false in production
environments to maximize performance.
2015-05-18 23:57:34 -04:00
Daniel Lowrey
0973bba5ef
Add PromiseStream to stream Promise updates without callback hell
2015-05-18 17:39:09 -04:00
Daniel Lowrey
02e85b29c6
Fix high cpu usage in timer loop from broken "nextTimerAt" caching
2015-05-18 11:40:09 -04:00
Daniel Lowrey
aa27ab7a10
Fixed bug causing every NativeReactor tick to last one second (lol)
2015-05-17 19:52:41 -04:00
Daniel Lowrey
631a6089d9
Resolve correct Success arg in empty any\(\) combinator
2015-05-15 15:59:57 -04:00
Daniel Lowrey
93eb8ad8de
Suggest nearby property name in Struct error messages
2015-05-13 10:05:56 -04:00
Daniel Lowrey
2c3a3e65bd
Add offending generator key to coroutine resolution error messages
2015-05-13 01:15:35 -04:00
Daniel Lowrey
4a45502ae9
Correctly update nextTimerAt timestamp for repeat watchers
2015-05-10 02:36:39 -04:00
Daniel Lowrey
ed6084c333
Fix incorrect additional increment
2015-05-10 00:54:02 -04:00
Daniel Lowrey
cddb8e9f08
Backport API changes to 5.5+ compat
2015-05-04 12:48:29 -04:00
Daniel Lowrey
b9819d85b4
kill reference to removed function
2015-04-29 13:45:06 -04:00
Daniel Lowrey
06981ab6ea
fix bad anon class syntax
2015-04-29 11:24:26 -04:00
Daniel Lowrey
1565e23d46
replace call_user_func() reference
2015-04-27 14:33:41 -04:00
Daniel Lowrey
7cb09edf29
Use anonymous classes
2015-04-27 14:33:17 -04:00
Daniel Lowrey
446eded441
Remove superfluous parameter
2015-04-27 14:30:07 -04:00
Daniel Lowrey
60f1b4484e
update docblock
2015-04-03 12:52:17 -04:00
Daniel Lowrey
812e1fb6b4
Reactor API updates, NativeReactor refactor
2015-04-03 11:56:16 -04:00
Daniel Lowrey
2aa4c0c357
Remove libevent reactor until pecl/libevent supports php7
2015-04-03 11:55:23 -04:00
Daniel Lowrey
b57f6eb6bf
Add explanatory comment
2015-03-28 10:05:09 -04:00
Daniel Lowrey
fa080b66aa
Remove superfluous is_object() check
2015-03-28 10:03:27 -04:00
Daniel Lowrey
9a1581c91d
Bind local vars to closure
2015-03-25 14:17:26 -04:00
Daniel Lowrey
654e82f277
minor cleanup
2015-03-23 11:07:40 -04:00
Daniel Lowrey
6375cdd522
Minor documentation rewording
2015-03-19 12:01:09 -04:00
Daniel Lowrey
abd5d34d92
Remove deprecated ReactorFactory
2015-03-19 11:59:20 -04:00
Daniel Lowrey
203855d22c
minor docblock update
2015-03-19 11:39:57 -04:00
Daniel Lowrey
d1b919d9fc
Avoid extra Closure instantiation in PrivateFuture
2015-03-19 11:39:38 -04:00
Daniel Lowrey
68185a6cf1
Promisor::update() now accepts variadic args
2015-03-19 11:26:56 -04:00
Daniel Lowrey
cd84401b6f
Remove superfluous Reactor::at() method
2015-03-19 11:19:19 -04:00
Daniel Lowrey
af2335cf50
Remove deprecated wait functionality
2015-03-19 11:17:50 -04:00
Daniel Lowrey
16be668192
Add scalar types, update docblocks
2015-03-19 11:15:07 -04:00
Daniel Lowrey
620f798b13
Add new Pause promise
2015-03-18 14:05:27 -04:00
Daniel Lowrey
2e1ef0b739
Implement Closure::call()
2015-03-16 15:03:52 -04:00
Daniel Lowrey
834255163c
Refactor coroutine functionality
2015-03-16 15:00:17 -04:00
Daniel Lowrey
a573e195a6
Allow null implicit yields
2015-02-18 09:53:55 -05:00
Daniel Lowrey
24acba4486
Merge branch 'psr' of https://github.com/lyrixx/amp into lyrixx-psr
2015-02-05 23:54:12 -05:00
Grégoire Pineau
01d50d10f9
Fixex typos
2015-02-05 18:17:05 +01:00
Daniel Lowrey
99e38762a7
- Added Reactor::coroutine()
method
...
- Added `Amp\coroutine()` function
- `YieldCommands` "enum" constant class removed -- yield keys now live in
the reactor class
- New optional `"coroutine"` yield key for self-documenting generator
yields.
- New optional `"async"` yield key for self-documenting promise yields.
- New `"return"` yield key for specifying the return value of a resolved
Generator coroutine. If not specified a resolved coroutine result is
equal to null.
- The final value yielded by a resolved `Generator` is *no longer* used
as its "return" value. Instead, generators must manually use the new
`"return"` yield key specifically to designate the value that should
be used to resolve the promise associated with generator resolution.
- `GeneratorResolver` trait renamed to `CoroutineResolver` and is now an
abstract class extended by the various `Reactor` implementations.
- Implicit "all" array combinator resolution is now removed. Use the
explicit form instead:
```php
function() {
list($a, $b, $c) = (yield 'all' => [$promise1, $promise2, $promise3]);
};
```
2015-02-03 19:41:15 -05:00
Daniel Lowrey
7e451251ab
Make Amp\Struct abstract to better represent its purpose
2015-01-28 22:30:02 -05:00
Daniel Lowrey
ab89cb1595
Remove unused variable
2015-01-21 20:19:47 -05:00
Daniel Lowrey
fb60221dcd
Correctly re-enable stream polls in UvReactor
2015-01-21 20:16:33 -05:00
Markus Staab
474c636845
Removed unused var
2015-01-21 23:00:41 +01:00
Bob Weinand
2ff42636aa
Fix waiting for immediates resolution
...
If there are immediates generated in immediates, they have to wait until next tick - which may only be triggered in far future or never, depending on if there are other read/writeWatchers or timers So, now just do a single event run without blocking if there are new immediates generated during immediates execution
2015-01-21 21:39:12 +01:00
Daniel Lowrey
9edef1d5a7
Fix UvReactor notices
2015-01-18 20:13:08 -05:00
Douglas G.R
cf3e13a595
Throws a RuntimeException if php-uv or libevent is not loaded.
...
Using UvReactor or LibeventReactor directly (instead of Amp\getReactor)
doesn't check if php-uv/libevent is loaded and dies with a 'Call to undefined
function' message.
2015-01-06 00:01:07 -02:00
Daniel Lowrey
a99b923819
Remove superfluous if conditional
2014-12-08 11:56:26 -05:00
Daniel Lowrey
0360aec301
Fix NativeReactor::tick() weirdness
2014-12-08 09:50:16 -05:00
Daniel Lowrey
bbfca9f7ac
Avoid unnecessary uv_timer_stop() when cleaning up once timers
2014-12-05 00:09:47 -05:00
Daniel Lowrey
49b7a73a8d
Minor libevent reactor bugfixes
2014-12-04 19:30:23 -05:00
Daniel Lowrey
b11e7a0fd1
Fix combinator function derps (again)
2014-12-04 18:08:13 -05:00
Daniel Lowrey
b93238eb1b
Fix bad instantiation class name
2014-12-04 17:59:27 -05:00
Daniel Lowrey
a8fe6e2e39
Fix combinator function derps
2014-12-04 13:34:42 -05:00
Daniel Lowrey
d795923318
Handle "@" yield key as implicit "nowait"
2014-12-02 14:47:51 -05:00
Daniel Lowrey
934d1aeffb
Return promise/result from bound functions
2014-12-02 12:43:00 -05:00
Daniel Lowrey
62de0cbc18
Implement 'bind' yield command
2014-12-02 11:52:41 -05:00
Daniel Lowrey
090bdf55ed
Rename "wait" yield command -> "pause" to avoid confusion with "nowait" and Amp\wait()
2014-12-02 11:29:19 -05:00
Daniel Lowrey
ba55ae360f
Fix minor inconsistency Reactor::stop() called from immediately watcher
2014-12-02 01:09:51 -05:00
Daniel Lowrey
dd1cbf8ca1
Merge branch 'debugInfo'
...
Conflicts:
lib/LibeventReactor.php
lib/NativeReactor.php
lib/UvReactor.php
2014-12-02 01:06:36 -05:00
Daniel Lowrey
14c209012c
Add Reactor::__debugInfo() for easier debugging
2014-12-02 00:45:12 -05:00
Daniel Lowrey
f32d088c23
Lots of changes ... see CHANGELOG for details
2014-12-01 19:45:57 -05:00
Daniel Lowrey
0d7ab5fc6c
Add Reactor::onError, correctly exit extension reactor loops, replace resolve function with trait
2014-12-01 18:12:26 -05:00
Daniel Lowrey
1480eecaba
Remove newloop protection from UvReactor
2014-12-01 15:39:57 -05:00
Daniel Lowrey
f686691892
Add Reactor::tick()
2014-11-26 15:53:18 -05:00
Daniel Lowrey
6d5e15d662
Apply boolean DeMorgan simplification
2014-11-26 15:49:14 -05:00
Chris Wright
c6b5d4fd17
Don't stop when there are immediates left
2014-11-26 17:03:18 +00:00
Daniel Lowrey
c75a8514a1
Reactor is now optional for combinator functions
2014-11-25 12:46:29 -05:00
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