Giter Site home page Giter Site logo

ListenableFuture chain method about threadly HOT 7 CLOSED

regbo avatar regbo commented on May 24, 2024
ListenableFuture chain method

from threadly.

Comments (7)

jentfoo avatar jentfoo commented on May 24, 2024

Thank you for the recommendation @regbo! I agree that chain would make it much simpler to adapt the futures.

I am less sure in the value of chainThrowing. It seems like throwing at this point is a break of the expected behavior of a future (which should silently contain the failure status). Is there a specific use case you have in mind where throwing at this point would be useful?

from threadly.

regbo avatar regbo commented on May 24, 2024

Is there a specific use case you have in mind where throwing at this point would be useful?

I imagine it's not worth it for everyone, but we use ThrowingFunctions for various adaptors, or to do unchecked get()'s with legacy code. Probably too niche of a need.

from threadly.

regbo avatar regbo commented on May 24, 2024

If you need another use caes for the "chain" method, we use it in conjunction with Reactor publishers that can be converted too and from futures. Reactor uses "as", and a stream library we use "StreamEx" uses "chain".

from threadly.

jentfoo avatar jentfoo commented on May 24, 2024

Thank you @regbo. I was also considering the specific function name, as is more obvious to me what it's designed to do. If that wording makes sense to you I think as is more descriptive.

Would you like to submit a PR for this change, or would you like me to draft this up? I would like to meet our normal standards for testing and documentation, so I am happy to either help comment on a PR of yours or draft up this change myself. Thank you!

from threadly.

regbo avatar regbo commented on May 24, 2024

I am a bit strapped for time ATM, so if you could submit the PR that'd be great. I also agree that "as" makes more sense here. Thanks a lot!

from threadly.

jentfoo avatar jentfoo commented on May 24, 2024

@regbo, I apologize for the delay. I have submitted this under the PR #279

If this looks good to you I am happy to release this as version 7.1. Feel free to leave any suggestions on the PR, thank you!

from threadly.

regbo avatar regbo commented on May 24, 2024

I too was delayed here. Looks great!

from threadly.

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.