visual studio 2002: c# threading question
Posted
by dotnet-practitioner
on Stack Overflow
See other posts from Stack Overflow
or by dotnet-practitioner
Published on 2010-06-02T16:32:25Z
Indexed on
2010/06/02
16:33 UTC
Read the original article
Hit count: 282
Hi,
I have a piece of code where I send a file content over tcp/ip channel. There are times when this connection hangs causing entire application to freeze. Is there a way for my main thread to spawn a worker thread and monitor that worker thread. If worker thread succeeds, well and good. If it hangs , the main thread could log error message and continue. How can I simulate in my test code that a worker thread is hanging. please let me know what could the code look like. I am using C# Visual studio 2002.
© Stack Overflow or respective owner