Hello,
I am working on a p2m client, and I'm using separate thread for each download - when an user adds a file to download, a new thread is created and the download starts in this thread. That's really cool, the GUI is responding all the time although I use waitFor... functions but there is one problem I can't solve - if, for example an user wants to pause the process of downloading or to stop and remove currently downloaded segments at all he/she selects the appropriate download (represented as a single row) and clicks a button responsible for such an action. And now, how to "inform" the right thread that it should pause/stop the downloading process? How to do it in a nice way?
Thanks in advance,
Michael
Bookmarks