Open
Description
The SDK's HttpUtility is needlessly creating threads for every request execution.
ExecutorService executor = Executors.newSingleThreadExecutor();
Future<ANetApiResponse> future = executor.submit(new HttpCallTask(env, request, classType));
executor.shutdown(); // Important!
try {
response = future.get();
logger.debug(String.format("Response: '%s'", response));
} ...
This is creating a new thread for every execution. EXPENSIVE!
I could be wrong, but I think it's a race condition where to assume the HTTPCallTask is started before the executor gets shutdown.
Waiting on future.get() which means no call is ever asynchronous.