mardi 19 juillet 2016

Trigger an async task on the server and return while the async task is running

I am on a java platform using Spring on the server. I want to do the following

  1. send a http request to the server that triggers an async task.
  2. return a response from the server after triggering the async task without
    waiting for the async task to finish.

I am having difficulties with returning the response because the async task is blocking the main thread resulting in a timeout on the client while the async task is running.

Anybody know any articles with examples regarding this functionality or anybody got a small code snippet that can illustrate a good way of doing this.

Aucun commentaire:

Enregistrer un commentaire