I have an ASP.NET Web API controller that I would have thought would operate asynchronously. The controller is designed to sleep 20 seconds for the first request, b
In my case here is output (it switches to another thread from 5 to 10):
Entry thread id: 5. Sync: System.Web.LegacyAspNetSynchronizationContext
Sleepy thread id: 10. Sync:
Finished sleeping
The thread '' (0x2c84) has exited with code 0 (0x0).
Entry thread id: 7. Sync: System.Web.LegacyAspNetSynchronizationContext
The thread '' (0x1818) has exited with code 0 (0x0).
Entry thread id: 5. Sync: System.Web.LegacyAspNetSynchronizationContext
The thread '' (0xd4c) has exited with code 0 (0x0).
The thread '' (0x2c30) has exited with code 0 (0x0).
This could be due to environment and machine running (single core) that makes the runtime decide how to run it.