C # Multithreading cannot evaluate the value of an expression because the code is optimized or the native framework is above the call stack

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.