Find an explanation online:
The stack is used to hold variables and methods, "on the call stack", we can understand that there are no variables and methods in the stack can be called, in fact, the program is finished, the stack is empty (the pointer is on the outside of the original stack).
Put in my actual scene: I opened an asynchronous to deal with an event, and the main thread does not wait for this asynchronous to end directly, in fact, the main thread is closed, asynchronous is still running, the result is that the memory is released, async of course can not find the variable, the error.
Trigger scenario: When multithreading runs large data volumes or complex computational logic, the execution takes more than 20 minutes and the thread is automatically recycled by IIS
Solution: Iis-> application pool, find application pool for app, right-click, advanced Settings, change idle timeout (minutes) to 1740 (default is 20 minutes)
C # Multithreading cannot evaluate the value of an expression because the code is optimized or the native framework is above the call stack