[undertow-dev] Inconsistency in performing async task

Stuart Douglas sdouglas at redhat.com
Sun Mar 25 20:50:55 EDT 2018


How are you running the task? If you just submit it to the worker it should
just run like any normal executor.

Stuart

On Mon, Mar 26, 2018 at 3:31 AM, Nabeel Imtiaz <nimtiazm at gmail.com> wrote:

> Hi,
>
> I'm trying to perform expensive tasks (like sending email/sms etc) as an
> async task (using CompletableFuture API) after my undertow worker completes
> and i'm about to respond to the client. These tasks are supposed to work
> like fire and forget and I don't want to wait until the task completes and
> then respond to the client.
>
> I've noticed that sometimes the task doesn't execute and sometimes it
> does. It's inconsistent and hard to reproduce. Is there a way to be able to
> perform these async tasks consistently? May be i'm using wrong thread-pool?
> Or may be there's already a way in Undertow to do such tasks.
>
> Please comment.
>
> Thanks.
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20180326/35e28dfe/attachment.html 


More information about the undertow-dev mailing list