Aaron Piotrowski
42d8ce764b
Add StreamSource::onDisposal()
2020-09-24 12:53:31 -05:00
Aaron Piotrowski
217c31c5ce
Add Promise\succeed() and Promise\fail()
2020-09-24 12:53:31 -05:00
Aaron Piotrowski
ee76c97c51
Add StreamSource::isDisposed()
2020-09-24 12:53:30 -05:00
Aaron Piotrowski
3fb87e2c18
Fix Psalm errors
2020-09-24 12:53:30 -05:00
Aaron Piotrowski
0ddf9a656e
Add Deferred::isResolved() and StreamSource::isComplete()
2020-09-24 12:53:30 -05:00
Aaron Piotrowski
1577906fc1
Make AsyncGenerator execution lazy
...
Matches behavior of Generator which does not start execution until an iteration method is invoked.
2020-09-24 12:53:30 -05:00
Aaron Piotrowski
5d0adebaa2
Add isDebugEnabled function
2020-09-24 12:53:30 -05:00
Aaron Piotrowski
f4cc591988
Feedback update
2020-09-24 12:53:30 -05:00
Aaron Piotrowski
b64b3affc9
Rename yield() to emit()
2020-09-24 12:53:30 -05:00
Aaron Piotrowski
66f0deb563
Drop YieldedValue
2020-09-24 12:53:29 -05:00
Aaron Piotrowski
dae252aea0
Rethrow exceptions from destructors
2020-09-24 12:53:29 -05:00
Aaron Piotrowski
8df006b011
Remove unnecessary internal interface
...
Switched Yielder trait to a concrete class YieldSource.
2020-09-24 12:53:29 -05:00
Aaron Piotrowski
d496c9db24
Resolve promise with YieldedValue
...
A suggested alternative to resolving with [$yieldedValue] since static analysis (specifically Psalm) doesn't play well with that API.
Will revert if Psalm changes or we decide to resolve with [$yieldedValue] anyway.
2020-09-24 12:53:29 -05:00
Aaron Piotrowski
57924690fe
Remove key
2020-09-24 12:53:29 -05:00
Aaron Piotrowski
e1402f8484
Remove StreamModifier
...
I'd rather put this in another repo.
For discoverability, we can add links to the repo in the docblocks here and on amphp.org.
2020-09-24 12:53:29 -05:00
Niklas Keller
85b4707832
Use AsyncTestCase for stream tests
2020-09-24 12:53:28 -05:00
Aaron Piotrowski
704f87ccc8
Use separate objects for stream ops
2020-09-24 12:53:28 -05:00
Aaron Piotrowski
94e01e7e49
Fix apply()
2020-09-24 12:53:28 -05:00
Aaron Piotrowski
3755155e51
Add callback to transform()
...
Suggestion for an apply()-like method.
2020-09-24 12:53:28 -05:00
Aaron Piotrowski
1b4863b7b3
Don't re-wrap stream
2020-09-24 12:53:28 -05:00
Aaron Piotrowski
6283d9bbb7
Intial stream transformations
2020-09-24 12:53:28 -05:00
Aaron Piotrowski
12c97b2561
Add explicit dispose() method to Stream
2020-09-24 12:53:28 -05:00
Aaron Piotrowski
96007f11aa
Add Streams
2020-09-24 12:53:27 -05:00
Niklas Keller
3a4c13ad9b
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2020-08-30 21:22:25 +02:00
Niklas Keller
aab5b5f7cc
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2020-07-23 22:41:59 +02:00
Niklas Keller
f220a51458
Change v2.4.5 to be v2.5.0 in changelog
2020-07-14 23:47:18 +02:00
Niklas Keller
be8f998cd7
Prepare v2.4.5 release
2020-07-14 23:44:02 +02:00
Niklas Keller
05483cdbef
Enforce timer interval as minimum time to execution ( #319 )
...
Co-authored-by: Aaron Piotrowski <aaron@trowski.com>
2020-07-14 21:45:35 +02:00
Aaron Piotrowski
0b802a501e
Mark repeat watcher as disabled then re-enable when executed ( #325 )
...
Fixes #324 .
2020-07-13 22:29:16 +02:00
Aaron Piotrowski
a04eda397b
Fix potential warning on shutdown in UvDriver
...
Like everything shutdown related, this depends on destruction order and appears to only happen on 7.4+.
2020-07-13 10:12:25 -05:00
Niklas Keller
e2c63c83eb
Add Amp\Iterator\discard ( #315 )
2020-05-06 18:57:29 +02:00
Niklas Keller
1e58d53e4a
Fix code style and run PsalmTest only on PHP 7.1+
2020-04-30 06:54:50 +02:00
Niklas Keller
17e2c2344c
Improve call / coroutine / wait types, add psalm test
2020-04-30 06:46:52 +02:00
Niklas Keller
a702c85f2f
Add generics for Amp\Promise\wait
2020-04-28 22:35:20 +02:00
Aaron Piotrowski
9b57affd4e
Return self from Delayed ref/unref
2020-04-23 23:43:48 -05:00
Aaron Piotrowski
4faeca163b
Fix ref/unref of Delayed after resolving
2020-04-20 12:01:50 -05:00
Niklas Keller
23ac95fc6d
Prepare v2.4.3 release
2020-04-19 17:54:21 +02:00
Niklas Keller
8ee469be90
Improve type definition for Amp\call
2020-04-19 15:38:36 +02:00
Aaron Piotrowski
0eb8ef438e
Make DriverControl an interface
2020-04-16 11:08:31 -05:00
Aaron Piotrowski
ab409bb254
Rename to DriverControl
2020-04-16 10:59:02 -05:00
Aaron Piotrowski
702aee45d3
Use delegate loop for Promise\wait()
2020-04-16 10:17:37 -05:00
Aaron Piotrowski
a062c3ed26
Update docs
2020-04-16 10:01:53 -05:00
Niklas Keller
5b4d019753
Allow tested calls to Amp\Promise\wait
2020-04-15 22:47:43 +02:00
Jáchym Toušek
2053b42fdb
Improve Deferred::resolve types ( #307 )
2020-04-05 22:37:09 +02:00
Niklas Keller
b6f99cd534
Use conditional psalm types for improved type inference
2020-04-05 22:17:32 +02:00
Niklas Keller
feca077369
Provide useful exception trace in TimeoutCancellationToken ( #303 )
...
Without this, the exception trace is pretty useless, because it only includes Loop::run() and other internal loop calls, giving absolutely no indication which kind of thing had a timeout.
Use debug_backtrace instead of creating the exception early, because it helps with the changes to GC behavior such a change might introduce.
Co-authored-by: Aaron Piotrowski <aaron@trowski.com>
2020-04-04 17:05:26 +02:00
Niklas Keller
8c486b40a8
Add generics to Deferred
2020-04-04 16:35:52 +02:00
Niklas Keller
3d250cbe30
Cover examples with psalm and add @psalm-yield to Promise
2020-04-04 15:49:26 +02:00
Niklas Keller
8f7300b1c3
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2020-03-31 21:57:37 +02:00
Niklas Keller
c34b679142
Remove psalm-suppress for fixed psalm bugs
2020-03-29 14:24:09 +02:00