Hyper body wait() will block the thread for ever


#1

Hello,
After calling wait method in hyper:body, however, curl send the request, but the thread will block forever and hyper will not respond anymore.
example code is :
req.body().concat2().map(|x| {x}).wait();


#2

Calling wait in hyper blocks the current thread, which is also executing the request. So you are blocking the request and at the same time waiting for it to finish.

You want to either continue chaining or execute the future on the tokio core.


#3

Would strongly recommend paying more attention to the documentation.

esp. for the wait method on a future