Comments (7)
@asm89 @davidwdan - This is really of no consequence to me (it is more to make Rx easier for new people). Is this something we can just wait until after a v2 release to discuss?
Also, if loop implementations auto-start, that would work just as well.
from rxphp.
We should close this issue as it poses no real concern for most users of async and really is more in the realm of the event-loop library or as @davidwdan can be provided in a helper library.
I would like to see the bootstrap.php file moved from the src into test as it is not intended for general use.
from rxphp.
Perhaps too much magic? Would this be up to the event loop implementations?
from rxphp.
This really is helpful mainly to those who are not familiar with async in PHP. For people who use it everyday the idea of having to start your event loop is second nature. People who are used to node or async in-browser are going to wonder why their beautiful Rx structures do nothing.
from rxphp.
Yes, from that perspective it makes sense. I'm just a little worried we will be hiding too much. The shutdown function also doesn't play nice with things like custom exception handlers AFAIK.
The magic scheduler is nice though.
from rxphp.
This implementation of bootstrap.php
expects you to register a DriverFactory
somewhere in your code. Otherwise this will throw an exception.
Package wyrihaximus/react-async-interop-loop
has its own bootstrap.php
that registers its DriverFactory
but is this reliable? I couldn't find anywhere that packages providing async-interop/event-loop-implementation
have to register loop drivers.
from rxphp.
I'm 50/50 on this. Like stated above, it's easy enough to provide this functionality by other means.
@martinsik It's not part of the spec, but I believe all of the other implementations are doing something similar. Since we require a loop implementation, is it safe to assume that a driver has to be set? If so, I don't see a problem with it throwing an exception.
from rxphp.
Related Issues (20)
- Promise::fromObservable should be cancelable
- Update PHPUnit to 5.7
- Disposed of scheduled item does not cancel timer in some instances
- EventLoopScheduler does not cancel timer in certain circumstances
- Not getting any output in the console HOT 6
- Weird result for Iterators and Generators and multiple listeners/subscribers HOT 2
- Change behavior when exception occurs in `onNext` HOT 1
- multi-threads support HOT 5
- Observable from function HOT 3
- How to resume on next after catch? HOT 3
- Unexpected Script Execution within PHP 7.3 HOT 8
- Test not working HOT 2
- Is this still maintained? HOT 1
- When trying to write a test I get 'Error: Call to undefined function Tests\onNext()' HOT 1
- Implement mergeDelayError HOT 2
- PHP 8 Compatibility HOT 4
- Handling streams HOT 1
- Pluck will error on null value
- [ General question ] functional API, RxJS-like HOT 2
- changing behavior of interval function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxphp.