Giter Site home page Giter Site logo

Comments (6)

jasnell avatar jasnell commented on May 21, 2024 2

Heh, sorry, wasn't being clear. In the uses I have in mind, the sink would call start but it wouldn't start automatically after bind. We're saying the same things but with different code calling start sometime after the bind has been performed.

from bob.

jasnell avatar jasnell commented on May 21, 2024

Definitely agree with this. The Sink should be in complete control over when to start data flow.

from bob.

Fishrock123 avatar Fishrock123 commented on May 21, 2024

To be clear - it already is, this is discussing making it less actually. I.e. making the outside code have to tell the sink to start explicitly.

from bob.

Fishrock123 avatar Fishrock123 commented on May 21, 2024

Something like

Stream(source, transform, sink).start() could then invoke sink.start(), or, more verbosely:

sink.bindSource(source, err => {}).start()

from bob.

Fishrock123 avatar Fishrock123 commented on May 21, 2024

Current extension reference: https://github.com/Fishrock123/bob/blob/master/reference-extension-start.js

from bob.

Fishrock123 avatar Fishrock123 commented on May 21, 2024

If we make start() standard we can move the "bindCb" (the exit/error callback) to start() instead which would make bindSource() not have developer polymorphism. I think that would probably be a good idea. (or, have start return a promise) (or conditionally) (one or the other)

from bob.

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.