p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# (http://p2p.wrox.com/forumdisplay.php?f=22)
-   -   Threads Help (http://p2p.wrox.com/showthread.php?t=2291)

hybrid_dev July 31st, 2003 10:23 AM

Threads Help
 
I have a form with a Search button, that switches into a Cancel button (just text changes and an IF/ELSE clause in the click effect)
So when I click Search, it changes into Cancel, i start a new thread that performs the loading of information from an SQL database into a DataSet, then i do some Invokes to set the datasource and the thread would end with my search results found.
The user could interrupt though by clicking the Cancel before the search is done and the thread is aborted, joined, and set to null.

The problem is, it works when i operate it normally, search and then cancel momentarily after, search and don't cancel it... but when i click it really fast, repeatedly, it messes up. The search continues and never stops, debug goes to the point of the SQL call (done thru a custom webservice) and the thread just seems to stop right there

any help would be appreciated. any thoughts? or further explanation?



All times are GMT -4. The time now is 01:21 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.