You are currently viewing the C# 2005 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
I have written an application that takes HTML document and apply predefined regular expression on it to parse certain data from the HTML document.
My problem is sometimes the regular expression get stuck and whole application went to Not responding condition. A solution that I implemented in it to recover from it is by using two thread. The first thread is like a monitor to second thread. In this thread I sleep the thread for 30 secs. It checks after 30 secs. if the 2nd thread has not returned properly or it is still running. If it finds it running, it forcefully abort the 2nd third.