cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Cloud Platform Android SDK

0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member284179
Discoverer
0 Kudos