Workers async method

What happens if my code inside workers calls to async function and line after that return response?

Will it finish to execute the async function?

I got my answer that its not the same and made changes to make it not async…

Usually a worker is terminate after a response is sent. You can use the method event.waitUntil().