GithubHelp home page GithubHelp logo

Autostart the scheduler about rxphp HOT 7 CLOSED

reactivex avatar reactivex commented on May 23, 2024
Autostart the scheduler

from rxphp.

Comments (7)

mbonneau avatar mbonneau commented on May 23, 2024 1

@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.

mbonneau avatar mbonneau commented on May 23, 2024 1

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.

asm89 avatar asm89 commented on May 23, 2024

Perhaps too much magic? Would this be up to the event loop implementations?

from rxphp.

mbonneau avatar mbonneau commented on May 23, 2024

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.

asm89 avatar asm89 commented on May 23, 2024

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.

martinsik avatar martinsik commented on May 23, 2024

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.

davidwdan avatar davidwdan commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.