We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0e30d8 commit d371dd9Copy full SHA for d371dd9
src/main/java/com/ning/http/client/AsyncHttpClient.java
@@ -365,6 +365,19 @@ public void close() {
365
isClosed.set(true);
366
}
367
368
+ /**
369
+ * Asynchronous close the {@link AsyncHttpProvider} by spawning a thread and avoid blocking.
370
+ */
371
+ public void closeAsynchronously() {
372
+ config.applicationThreadPool.submit(new Runnable() {
373
+
374
+ public void run() {
375
+ httpProvider.close();
376
+ isClosed.set(true);
377
+ }
378
+ });
379
380
381
@Override
382
protected void finalize() throws Throwable {
383
try {
0 commit comments