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:

  1. How does a seizure occur at all? I want to understand the details.
  2. What are the conditions for initializing the timer?
  3. Have to always use NonCapturingTimer (class from example)?

    0