Unit Testing, Agile Development, Leadership & .NET - By Roy Osherove
Calling them immediately one after the other may produce this problem due to a resource locking problem.
Calling thread.sleep(1) inside the "RunWorkerAsync" method as the first line shoudl solve it..
I read an article that says calling abort on a thread is a bad thing...
I was hoping to use this in a database query tool, I wanted users to be able to cancel long running queries. I read somewhere else that calling abort on the thread doesn't cancel the operation on the server, it just means that the client thread is gone....and sometimes the server can't find the client and does wonky things like getting stuck in an infinite loop.
Is this safe to use to cancel long running queries against a database, and having the database cancel the query itself, rather than just having the client disconnect?
Pingback from Extend the BackgroundWorker Control htt… « .NET Professional Programming