Asynchronous task in request handler

Hi all!

I have a function that runs for a long time so when I called in the request handler I get a timeout. I want to run this query asynchronously and I want to know will there be problems if I create a new asynchronous thread from the request handler?

Thank you.

By async thread I’m assuming you mean BG Thread, you’ll lose any ThreadContext storage but you can still write to the Response just be aware that the IRequest/IResponse are not thread safe so there can only 1 thread accessing it at any one time.

1 Like