Skip to content

Commit 1da0a86

Browse files
committed
Add warning about blocking operation, see AsyncHttpClient#1298
1 parent a9a6ae5 commit 1da0a86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/src/main/java/org/asynchttpclient/AsyncHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
* client.prepareGet("http://...").execute(ah);
4141
* </pre></blockquote>
4242
* It is recommended to create a new instance instead.
43+
*
44+
* Do NOT perform any blocking operation in there, typically trying to send another request and call get() on its future.
45+
* There's a chance you might end up in a dead lock.
46+
* If you really to perform blocking operation, executed it in a different dedicated thread pool.
4347
*
4448
* @param <T> Type of object returned by the {@link java.util.concurrent.Future#get}
4549
*/

0 commit comments

Comments
 (0)