on 04-20-2019 10:43 AM
Hello,
I want to wait until the response returns so I do this :
boolean running = true;
scpService.getDownloadSetAsync(query, downloads -> {
running = false;
}, e -> {
running = false;
});
while (running) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
and it works only with getAsync.
but when I do the same thing on createEntityAsync/updateEntityAsync/deleteEntityAsync response doesn’t return and system stuck in while loop.
I read on developers guide that:
By default, queries are executed in parallel on Async.THREAD_POOL_EXECUTOR while CUD requests are executed serially on AsyncTask.SERIAL_EXECUTOR. This behavior can be changed by passing in your own executor.
but I don’t know how can I change this behavior?
Thanks.
Please see setActionExecutor and setFunctionExecutor here: https://help.sap.com/doc/c2d571df73104f72b9f1b73e06c5609a/Latest/en-US/docs/javadoc/odata/reference/...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.