Questions tagged [future]
A placeholder for the result of a calculation before the calculation has completed. Used in concurrent programming. Questions about future events are off-topic on Stack Overflow.
future
3,865
questions
1
vote
1
answer
47
views
Scala Future strange behavior
What's wrong with this code? Why I can see only one output? What returns futureUserByName function? onComplete doesn't work for it as well. It must be just simple Future, but it doesn't work.
import ...
-1
votes
1
answer
38
views
%dofuture% foreach file not found warning
Trying to get %dofuture% to work, but getting an error using the following code. Not sure why.
library(foreach)
library(doParallel)
library(doFuture)
plan(multisession,workers=availableCores())
# ...
3
votes
0
answers
44
views
Intuition for parallel memory use in R
There are a lot of questions about parallel computing in R but I couldn't find one that seems similar to my problem.
In my case, I'm using the searchk() function in R's stm package on a very large stm ...
0
votes
0
answers
54
views
Is there a way to cancel future in Dart?
Is there a way to cancel future in Dart?
Is there an alternative to Future for this case?
We compute something but discard the result if a new request is made:
class A extend ChangeNotifier{
int ...
1
vote
1
answer
128
views
List of Future is not executed in parallel
I don't understand why this code is not executed in parallel.
implicit val ec: ExecutionContext = system.dispatchers.lookup("db-non-blocking")
println(s"Cores ${Runtime.getRuntime()....
1
vote
1
answer
61
views
"Process finished with exit code -1073740791 (0xC0000409)" when use vector of future
Background
As a freshmen to binance-websocket api and std::future using. I write a program to test the time difference between localhost and the binance server, and to get the net delay.
I push my ...
0
votes
1
answer
47
views
how to structure my code to have retries in a function that return a Promises
so i have not really worked too much with C++ promise and future and i am unable to understand how i can add retries to a method that returns a promise but i have a method like below
promise<void&...
0
votes
3
answers
46
views
Flutter Future<List<Image>> convert to List<Image>
List<Image> convertToImgList(Future<List<Image>> listimg) {
var li = listimg.asStream();
Future<int> future = listimg.asStream().length;
return images;
}
Hi,
I want to ...
0
votes
2
answers
20
views
dask pybind11 how to get the correct value from client.submit()
I have a question about the return object value from python.
use pybind11 to interface C++ function from python3
use Dask to do distributed computing
The following are the progeam snippet.
// ---------...
0
votes
2
answers
136
views
Understanding Java concurrency [closed]
I'm learning java concurrency under the hood and I've read some java article and videos regarding multi threading and concurrency and just can't seem to put them all together
Here is the gist of what ...
0
votes
3
answers
50
views
showModelBottomSheet is not opening after Future.delay
I have two showModalBottomSheet(). In the First modalSheet there is a IconButton(). When the IconButton tapped, The First sheet should be closed and after 2 seconds the second modalSheet should be ...
0
votes
0
answers
18
views
Multiple streamed response combined in a single iterator in Scala
I have multiple replicas of a service from which I am receiving a stream of response:
// RPC call to server that returns a stream of response.
def getResult(input: Request): Iterator[ResultItem]
On ...
2
votes
1
answer
89
views
C++ multiple promises for one task
My use-case is rather common.
I have a class that performs some asynchronous operation: e.g. get some data asynchronously from a service;
I can have multiple requests (get_data calls) for that ...
-1
votes
2
answers
172
views
Blocking wait on future OUTSIDE of async functions
I'm starting to get pretty frustrated with Dart's async ...
All I want is lazily load some value and assign it to a property in my class:
Future<String> getMeSomeBar() async => "bar"...
0
votes
1
answer
60
views
how to avoid while loop while waiting for future complete?
I have a problem with a java future and an handler function. code example:
public HealthCheckResponse call() {
String redisHost = this.configuration.getRedisHost();
log.info("connect to ...