C # process is delayed after all threads have completed

I have a multithreaded application with a C # console with a lot of trhat threads ending. All my streams go out. 90% of the time the app exits gracefully. But in 10% of cases, a copy of my application is delayed: the console is still open.

I join this through Visual Studio 2010 and use break to interrupt it, and I see two “empty” stack frames: one for Main and one for one of my applications created by the application. There is nothing on the stack. Visual Studio says that "the source code is not available for the stream" if I click on any of these streams and it offers a "code breakdown" link. I click on this and it says that "disassembled code is not available for this thread."

Any ideas what I can do wrong?

+3
source share
1 answer

Does the code end after some extra minutes. It may happen that some .NET accessory or garbage collection thread is still running. This may take some extra time.

Whether debug build or release build is in progress, and you are sure that this process is not one of those processes that are hosted in Visual Studio that work for development purposes.

+2
source

Source: https://habr.com/ru/post/1785925/


All Articles