Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
344 views

FutureBuilder runs twice even it is not supposed to

This is my code: class HomePage extends StatefulWidget { const HomePage({Key? key}) : super(key: key); @override State<HomePage> createState() => _HomePageState(); } class ...
jsfrz's user avatar
  • 139
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. ...
Luke Hutchison's user avatar
-1 votes
1 answer
22 views

Why even after putting await keyword my app will show 0?

I have called trigger function inside initState function.In trigger function i will be taking data from an API and i parsed the data using storeddata.fromjson function. Then afterwards i will store ...
Varun Hegde's user avatar
0 votes
1 answer
2k views

Get values for variables in FutureBuilder and use in layout

Variable dependent widgets are processed before FutureBuilder finishes execution. With the following code 'subtraction was called on null' error appears. - Is it possible to get word (problem) ...
Kirill Zaitsev's user avatar
0 votes
0 answers
67 views

I need a return getting a value from inside the callback method

I need to return a ListView from the following code. getUser() is a function to return a user from the database, that does it asynchronously. I'm using Firebase, by the way. I need it to return the ...
Hyung Tae Carapeto Figur's user avatar
0 votes
2 answers
243 views

Future and asynchronism

I use a extern api (ESRI API for Android) where I have a loop for which me return a class Future ... for (Layer layer : layers) { // ListenableFuture extends Future<V> final ListenableFuture&...
lg0173's user avatar
  • 236
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 ...
Mohan's user avatar
  • 3,903
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'...
Anonomoose's user avatar
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 (...
Brenne's user avatar
  • 265
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 ...
RagHaven's user avatar
  • 4,317
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 ...
john's user avatar
  • 11.7k
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 = ...
Tobia's user avatar
  • 9,474
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 ...
Doc Davluz's user avatar
  • 4,210
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 ...
Trying's user avatar
  • 14.3k
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 ...
sgd's user avatar
  • 31
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 ...
kevin's user avatar
  • 817