Comments (7)
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.
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.
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.
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.
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.
@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.
I too was delayed here. Looks great!
from threadly.
Related Issues (20)
- Create compatability layer with CompletableFuture
- Figure out potential ways to optimize large mapped chains of ListenableFuture's HOT 1
- StackOverflowError's may result in SettableListenableFuture's not completing HOT 1
- StackOverflowError's may be swallowed in ExceptionUtils.handleException HOT 1
- Move to gitlab? HOT 1
- PriorityScheduler and preemption HOT 3
- Threadly 5.32: PriorityScheduler.workerIdle spin locking with high thread limit HOT 6
- Add `ThreadlyConfig`
- ListenableFutureTask needs to be re-implemented HOT 1
- Should `ListenableFuture` be renamed to `Promise` HOT 2
- PriorityScheduler: Add ability to resisting thread starts for starvable tasks
- Split org.threadly.test to a new artifact for 6.0 HOT 2
- Add way to get ListenableFuture error state without needing to throw or use a callback HOT 1
- Unfair threadexecutor is slower than executorservice (new FixedThreadPool) HOT 5
- Add ForkJoinPool idle worker stack to be identified by Profiler
- Profiler: An additional PriorityScheduler stack is not being identified as idle HOT 1
- JDK 17 HOT 7
- ListenableFuture listener may be executed on an unexpected thread under special ListenerOptimizationStrategy configurations HOT 1
- Consultation regarding performance HOT 2
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 threadly.