Is a new thread in a Visual Studio test project aborted when the test ends?

Posted by Michel on Stack Overflow See other posts from Stack Overflow or by Michel
Published on 2010-05-15T10:40:10Z Indexed on 2010/05/15 10:44 UTC
Read the original article Hit count: 219

Filed under:
|
|

Hi,

i have to do some message exchange with a 3rd party (in a website). When the client posts a page, i start the message exchange. When that doesn't succeed for some reason, i report this to the client by rendering the page with a message. On the background, in a separate thread, i start a process to send abort messages to the 3rd party. I can't do this while the user is waiting for the page to come back, because it might take a few minutes.

But in a test project, the test ends when the message to the 3rd party is sent, and after the new thread is started. But it seems that the new thread also ends, when the test is done.

Is that normal behaviour?

I do start the thread in a new class with a reference to 2 objects from the class which tries to send the message in the first place, may that be a problem?

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET