Skip to content

Commit c147fc9

Browse files
committed
Add warning about blocking operation, see #1298
1 parent d774b56 commit c147fc9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
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
*/

client/src/test/resources/logback-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<logger name="org.eclipse" level="INFO"/>
99

10-
<root level="DEBUg=">
10+
<root level="DEBUG">
1111
<appender-ref ref="CONSOLE"/>
1212
</root>
1313
</configuration>

0 commit comments

Comments
 (0)