All Questions
11 questions
0
votes
1
answer
587
views
Constructing a DAG of cancelable Java tasks
I want to create a DAG out of tasks in Java, where the tasks may depend upon the output of other tasks. If there is no directed path between two tasks, they may run in parallel. Tasks may be canceled. ...
0
votes
1
answer
411
views
Execute a same method in parallel with different input's using Future and @ Async
I have a java method that needs to be execute in parallel with different set of input's(from list). Basically my business logic method has some external call logic that consumes little amount of time ...
11
votes
3
answers
23k
views
Getting a result in the future?
I'm looking to get a result from a method which can take a while to complete and doesn't actually return the object, so I'd like to deal with it as effectively as possible. Here's an example of what I'...
6
votes
2
answers
724
views
Continue when one future task has expected result
I have 3 FutureTask<T> Objects. I want that they are processed asynchronously. However, as soon as one of the FutureTasks' get() methods doesn't return null I want to continue i.e my method (...
4
votes
2
answers
328
views
Asynchronous Programming in Java when using blocking APIs [duplicate]
I am working on a Java project that uses certain APIs that are blocking.
I would like to use asynchronous programming and callbacks, so that I don't have to block while waiting for the result. I've ...
1
vote
1
answer
2k
views
How to implement asynchronous call with callback?
I need to make a library in which I will have synchronous and asynchronous methods in it.
Core Logic of my Library -
The customer will use our library and they will call it by passing DataKey ...
1
vote
1
answer
2k
views
Java Asynchronous process runner with inputstream reader using Futuretask
I'm trying to run an asynchronous process and getting its inputstream (if there is).
This is my code:
CommandCall commandCall = new CommandCall(commands);
ExecutorService executor = ...
1
vote
1
answer
201
views
How to propagate timeout from one FutureTask to another dependent one used by its Callable?
I am in the following situation (perhaps I have overengineered the whole thing or I am in a complete deadlock, but cannot think to another way of doing that):
Take one or more FutureTask that realize ...
8
votes
1
answer
6k
views
How FutureTask is asynchronous computation
new Thread(new Runnable() {
public void run() {
.............
.............
.............
}
}).start();
If i will do this in main it ...
0
votes
1
answer
709
views
Trouble using FutureTask for Asynchronous proceedures
In my Java web app I have a method which ends out about 200 emails. Because of email server delay the whole process takes about 7 minutes. This bulk email sending has to take place as the result of ...
0
votes
2
answers
2k
views
Implementing asynchronous call using FutureTask and callback
So right now, I am trying to implement an asynchronous call which calls my BasicHttpClient to get Http response from the internet, when the Http client done its work, it calls one of Callee class's ...