Request blocked by "await Task.Delay"

Topics: ASP.NET Web API
Aug 2, 2013 at 11:16 AM
I'm having the following simple Web API controller:
    public class MyController : ApiController
    {
        public MyController()
        {
            AsyncTimer();
        }

        [HttpGet]
        public string Get()
        {
            return "asdf";
        }

        private async void AsyncTimer()
        {
            await Task.Delay(10000);
            System.Diagnostics.Debug.WriteLine("Async timer...");
        }
    }
It seems the get request will not return until my AsyncTimer has finished after 10 seconds. But since the return value of AsyncTimer is void, the constructor returns immediately after calling AsyncTimer.

The expected behavior should be letting the AsyncTimer running in parallel with the Get method, any ideas?

Thanks.