Hi,

On Thu, Jul 28, 2016 at 4:06 PM, Sergey Mashkov
<[email protected]> wrote:
> Hi everyone
>
> I am experiencing difficulties with async jetty HTTP client api. I have a
> request, I setup async content listener like this
>
> request.onResponseContentAsync { response, buffer, callback ->
>     // schedule some async task then call callback.success() on completed
> }
>
> It works but I am receiving next events before the callback get notified so
> I can't stop events.

Are you sure ?
That is exactly the meaning of the callback, to stop delivering events
until succeeded() (or failed()) is called.

> The only solution is to block inside the handler but it
> doesn't look like async at all. Is there way to suspend upcoming events
> until callback.success() called?

If it does not work it's a bug, but we have test cases that cover this.

Can you put up a reproducible test case that shows the issue ?

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to