On githab in tickets for corefx and asp.net, there are a lot of discussions about AsyncLocal capture when creating a timer . # 26071 # 26065 ....
to solve the problem it is recommended to use such code ( example )
We need answers in clear words to the questions:
- How does a seizure occur at all? I want to understand the details.
- What are the conditions for initializing the timer?
- Have to always use NonCapturingTimer (class from example)?